Project

General

Profile

Bug #24493

Cannot add host parameters to hosts: Name has already been taken

Added by Ivan Necas about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Difficulty:
Triaged:
No
Bugzilla link:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1609764

Description of problem:

Cannot add any Host Parameters to the Hosts in UI
because it tries to add them twice, so it raise 'Name has already been taken' error

Version-Release number of selected component (if applicable):
6.4, snap 14

How reproducible:
always

Steps to Reproduce:
1. navigate to Hosts > All Hosts > select > Edit > Parameters
2. button Add Parameter
3. fill any values to Name and Value
4. button Submit

Actual results:
all entered Host Parameters are shown twice and there is an error message saying Name has already been taken

Expected results:
Host Parameter is added

Additional info:
it works in 6.3, it is a regression


Related issues

Related to Katello - Bug #23837: Content View is not updated on Content Host when change is made via Hosts / All Hosts <Edit option>Closed2018-06-06

Associated revisions

Revision c4a8637c (diff)
Added by Ivan Necas about 4 years ago

Fixes #24493 - fix double creation of resources on host.update (#353)

The issue is the `assign_attributes` can have already some side-effects
for sub-resources (such as parameters), and calling `super` causes
double-creation of the resources.

Changing super to `save` makes sure that we avoid this double creation.

History

#1 Updated by Ivan Necas about 4 years ago

  • Subject changed from Cannot add host parameters to hosts: Name has already been taken to Cannot add host parameters to hosts: Name has already been taken

This is a regression introduced by #23837, specifically https://github.com/theforeman/foreman-tasks/pull/349

The issue is the `assign_attributes` can have already some side-effects for sub-resources, and calling `super` causes double-creation of the resources.

#2 Updated by The Foreman Bot about 4 years ago

  • Assignee set to Ivan Necas
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman-tasks/pull/353 added

#3 Updated by Ivan Necas about 4 years ago

  • Target version set to foreman-tasks-0.13.4 (Foreman 1.18)
  • Status changed from Ready For Testing to Closed

#4 Updated by Ivan Necas about 4 years ago

  • Fixed in Releases foreman-tasks-0.13.4 (Foreman 1.18), foreman-tasks-0.14.0 (Foreman 1.20) added

#5 Updated by Ivan Necas almost 4 years ago

  • Related to Bug #23837: Content View is not updated on Content Host when change is made via Hosts / All Hosts <Edit option> added

Also available in: Atom PDF