Red Hat Bugzilla – Bug 1233391
Cloning Host Groups via the web ui fails with a 400 error
Last modified: 2016-07-27 04:52:38 EDT
Created attachment 1040620 [details] Host Group not found Description of problem: I have 2 Host Groups: * Associated with activation key, published content view and OS for RHEL 6.6 i386 * Associated with activation key, published content view and OS for RHEL 7.1 x86_64 When I select the 'RHEL 6.6 i386' Host Group and click the 'Clone' menu entry, I noticed that the activation key field is populated with the value from the 'RHEL 7.1 x86_64' Host Group. So I go through the entire form, changing everything related to RHEL 6.6 to RHEL 7.1 and when I finally click the Save button I'm taken to a page that says: Host Group not found (see attached screenshot). Version-Release number of selected component (if applicable): * Satellite 6.1.0 S8C3 How reproducible: Steps to Reproduce: 1. Create a valid host group 2. Using the web ui, try to clone it 3. Actual results: Expected results: Additional info: ==> /var/log/foreman/production.log <== 2015-06-18 15:17:44 [I] Processing by HostgroupsController#create as HTML 2015-06-18 15:17:44 [I] Parameters: {"utf8"=>"✓", "authenticity_token"=>"TrsFLjD7erNtOr0wNP9OTehLA1UyG4VBfWvBe/kiHAI=", "hostgroup"=>{"parent_id"=>"", "name"=>"foo", "lifecycle_environment_id"=>"2", "content_view_id"=>"8", "environment_id"=>"15", "compute_profile_id"=>"1", "content_source_id"=>"1", "puppet_ca_proxy_id"=>"1", "puppet_proxy_id"=>"1", "puppetclass_ids"=>["", "2", "1"], "domain_id"=>"1", "subnet_id"=>"1", "realm_id"=>"", "architecture_id"=>"2", "operatingsystem_id"=>"3", "medium_id"=>"", "ptable_id"=>"7", "root_pass"=>"[FILTERED]", "group_parameters_attributes"=>{"0"=>{"name"=>"ipaddr", "value"=>"[FILTERED]", "hidden_value"=>"[FILTERED]", "_destroy"=>"false", "nested"=>"", "id"=>"1"}, "1"=>{"name"=>"kt_activation_keys", "value"=>"[FILTERED]", "hidden_value"=>"[FILTERED]", "_destroy"=>"false", "nested"=>"", "id"=>"2"}, "2"=>{"name"=>"kt_activation_keys", "value"=>"[FILTERED]", "hidden_value"=>"[FILTERED]", "_destroy"=>"false", "nested"=>"", "id"=>"3"}}, "location_ids"=>["", "2"], "organization_ids"=>["", "1"], "id"=>"[1, 2]"}, "kt_activation_keys"=>"ak-rhel-7-server-64", "commit"=>"Submit"} 2015-06-18 15:17:44 [I] Rendered common/404.html.erb within layouts/application (0.9ms) 2015-06-18 15:17:44 [I] Rendered layouts/base.html.erb (0.9ms) 2015-06-18 15:17:44 [I] Completed 404 Not Found in 25ms (Views: 3.5ms | ActiveRecord: 3.9ms) ==> /var/log/httpd/foreman-ssl_access_ssl.log <== 10.10.56.41 - - [18/Jun/2015:15:17:44 -0400] "POST /hostgroups HTTP/1.1" 404 2055 "https://ibm-x3250m4-01.lab.eng.rdu2.redhat.com/hostgroups/2-RHEL%206%2032bit%20HG/clone" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0"
Looking at the values from /var/log/foreman/production.log (above), I see that the form seems to still be passing "kt_activation_keys"=>"ak-rhel-7-server-64" but I chose "ak-rhel-66-64bit" before I clicked the Submit button...
I saw the same behavior. When I cloned the host group, the activation key was incorrect. I updated it to the right Activation key but still got the error as mentioned in this bug.
Connecting redmine issue http://projects.theforeman.org/issues/9815 from this bug
Is there a workaround for this issue that I can add to a release note? thanks
(In reply to David O'Brien from comment #5) > Is there a workaround for this issue that I can add to a release note? > > thanks The issue is at the validation level, so there isn't a workaround available.
Upstream bug component is Provisioning
Upstream bug component is Host Group
Verified in Sat 6.2 snap 4. The issue is no more reproducible. I can create a cloned Host Group without said issue. [Screenshot Attached].
Created attachment 1138576 [details] [Verified] Screenshot Attached
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1500