Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1233391

Summary: Cloning Host Groups via the web ui fails with a 400 error
Product: Red Hat Satellite Reporter: Og Maciel <omaciel>
Component: Host GroupAssignee: Christine Fouant <cfouant>
Status: CLOSED ERRATA QA Contact: Jitendra Yejare <jyejare>
Severity: high Docs Contact: Russell Dickenson <rdickens>
Priority: unspecified    
Version: 6.1.0CC: bbuckingham, bkearney, cfouant, jyejare, mburgerh, mmccune, sthirugn
Target Milestone: UnspecifiedKeywords: ReleaseNotes, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/9815
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Issue: If you try to clone a Host group which has either global parameters or activation keys, you may see the following error message when you click Save. --- Host Group not found --- Workaround: None at this time.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 08:52:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1190823    
Attachments:
Description Flags
Host Group not found
none
[Verified] Screenshot Attached none

Description Og Maciel 2015-06-18 19:25:02 UTC
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"

Comment 1 Og Maciel 2015-06-18 19:28:11 UTC
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...

Comment 3 sthirugn@redhat.com 2015-06-18 19:51:06 UTC
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.

Comment 4 Christine Fouant 2015-07-16 17:43:14 UTC
Connecting redmine issue http://projects.theforeman.org/issues/9815 from this bug

Comment 5 David O'Brien 2015-08-20 02:25:20 UTC
Is there a workaround for this issue that I can add to a release note?

thanks

Comment 6 Christine Fouant 2015-08-20 13:04:28 UTC
(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.

Comment 10 Bryan Kearney 2015-08-25 18:35:48 UTC
Upstream bug component is Provisioning

Comment 11 Bryan Kearney 2015-08-26 18:03:08 UTC
Upstream bug component is Provisioning

Comment 12 Bryan Kearney 2015-08-26 18:42:55 UTC
Upstream bug component is Host Group

Comment 17 Jitendra Yejare 2016-03-21 12:21:24 UTC
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].

Comment 18 Jitendra Yejare 2016-03-21 12:22:05 UTC
Created attachment 1138576 [details]
[Verified] Screenshot Attached

Comment 21 errata-xmlrpc 2016-07-27 08:52:38 UTC
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