Bug 1243649 - Satellite 6.0.8 error when trying to un-associate hostgroup from an organization
Summary: Satellite 6.0.8 error when trying to un-associate hostgroup from an organization
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Organizations and Locations
Version: 6.0.8
Hardware: Unspecified
OS: Unspecified
high vote
Target Milestone: Unspecified
Assignee: Shimon Shtein
QA Contact: Kedar Bidarkar
URL: http://projects.theforeman.org/issues...
Depends On:
Blocks: sat61-release-notes
TreeView+ depends on / blocked
Reported: 2015-07-16 02:54 UTC by jnikolak
Modified: 2019-09-12 08:38 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-07-27 11:36:21 UTC

Attachments (Terms of Use)
screenshot2 (35.42 KB, image/png)
2015-07-16 02:54 UTC, jnikolak
no flags Details
host-group delete message assoc with org (50.52 KB, image/png)
2016-06-17 09:25 UTC, Kedar Bidarkar
no flags Details

System ID Priority Status Summary Last Updated
Foreman Issue Tracker 11188 None None None 2016-05-10 18:22:51 UTC
Foreman Issue Tracker 14226 None None None 2016-04-26 16:55:34 UTC

Description jnikolak 2015-07-16 02:54:44 UTC
Created attachment 1052533 [details]

To reproduce:

1. Ensure that you have 2 organizations (we'll call them A and B), and a host assigned to organization A with host group A
2. Go to Hosts / All Hosts, tick the host and then go to Select Action / Assign Organization
3. Attempt to move the host to the new organization with "Fix Organization on Mismatch"

This is while host is still in host group A and the host moves successfully without a problem, however, we now have even bigger problems:

Deleting a hostgroup that is refereed by another org (that is not visible to your account) does not error correctly. 
In addition to that, it won't actually delete and gives the error:
See Screenshot2

This issue was confirmed as per Bugzilla: 1243276, it was requested that I create a new bugzilla for this issue.

What are the steps to successfully associate(remote) this new hostgroup from the new organization. Without affecting the original organization.

Comment 1 RHEL Product and Program Management 2015-07-16 03:15:26 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 David O'Brien 2015-07-31 05:07:09 UTC
Is there any workaround or recommendation that I can add to a release note for this?


Comment 4 David O'Brien 2015-08-19 02:50:01 UTC
Is there any workaround or recommendation that I can add to a release note for this?


Comment 7 Shimon Shtein 2016-03-16 09:29:16 UTC
Created redmine issue http://projects.theforeman.org/issues/14226 from this bug

Comment 8 Bryan Kearney 2016-03-16 10:01:51 UTC
Upstream bug component is Provisioning

Comment 10 David O'Brien 2016-04-18 00:48:38 UTC
Reset docs contact <> daobrien

Comment 11 Bryan Kearney 2016-05-03 16:10:19 UTC
Upstream bug component is Organizations and Locations

Comment 12 Shimon Shtein 2016-05-10 12:04:34 UTC
The main issue is fixed in upstream commit https://github.com/theforeman/foreman/commit/08d4fc31447487181f59e7be54121fc681f3a5b4

The commit will enable the user to see which hosts are preventing the hostgroup from being deleted.

Comment 13 Shimon Shtein 2016-05-10 12:13:32 UTC
Further warning to the user about using the same hostgroup in multiple taxonomies was rejected upstream. 
See http://projects.theforeman.org/issues/14226#note-4 for more details.

Comment 14 Shimon Shtein 2016-05-10 12:32:22 UTC
The message is already in the downstream, see https://bugzilla.redhat.com/show_bug.cgi?id=1207972 .

Comment 15 Kedar Bidarkar 2016-06-17 09:22:08 UTC
When we follow the procedure as mentioned in the initial bug description and try to delete the hostgroup in A Org, we get the below message.

2016-06-17 05:12:48 [app] [I] Started DELETE "/hostgroups/1-rhel72_hgrp" for at 2016-06-17 05:12:48 -0400
2016-06-17 05:12:48 [app] [I] Processing by HostgroupsController#destroy as HTML
2016-06-17 05:12:48 [app] [I]   Parameters: {"authenticity_token"=>"jWaNg5Li/6HaiB27Fdn2OY7rcXYXTVLIemweu9Tikdk=", "id"=>"1-rhel72_hgrp"}
2016-06-17 05:12:49 [app] [E] You may not destroy rhel72_hgrp as it is in use!
2016-06-17 05:12:49 [app] [I] Failed to save: rhel72_hgrp is being used by a hidden Host::Managed resource
2016-06-17 05:12:49 [app] [I] Redirected to https://testsat6.redhat.com/hostgroups
2016-06-17 05:12:49 [app] [I] Completed 302 Found in 615ms (ActiveRecord: 67.5ms)

Also we get an appropriate message on the UI as below,
"Error: rhel72_hgrp is being used by a hidden Host::Managed resource".

Also to find and move all the hosts to move to another host-group we need to follow this procedure, https://bugzilla.redhat.com/show_bug.cgi?id=1243649#c5

VERIFIED with sat62-snap(GA)-14.1

Comment 16 Kedar Bidarkar 2016-06-17 09:25:12 UTC
Created attachment 1169004 [details]
host-group delete message assoc with org

Comment 17 Bryan Kearney 2016-07-27 11:36:21 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.


Note You need to log in before you can comment on or make changes to this bug.