Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1243649 - Satellite 6.0.8 error when trying to un-associate hostgroup from an organization
Satellite 6.0.8 error when trying to un-associate hostgroup from an organization
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Organizations and Locations (Show other bugs)
6.0.8
Unspecified Unspecified
unspecified Severity high (vote)
: GA
: Unused
Assigned To: Shimon Shtein
Kedar Bidarkar
http://projects.theforeman.org/issues...
: ReleaseNotes, Triaged
Depends On:
Blocks: sat61-release-notes
  Show dependency treegraph
 
Reported: 2015-07-15 22:54 EDT by jnikolak
Modified: 2016-07-27 07:36 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 07:36:21 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 11188 None None None 2016-05-10 14:22 EDT
Foreman Issue Tracker 14226 None None None 2016-04-26 12:55 EDT

  None (edit)
Description jnikolak 2015-07-15 22:54:44 EDT
Created attachment 1052533 [details]
screenshot2

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-15 23:15:26 EDT
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 01:07:09 EDT
Is there any workaround or recommendation that I can add to a release note for this?

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

thanks
Comment 7 Shimon Shtein 2016-03-16 05:29:16 EDT
Created redmine issue http://projects.theforeman.org/issues/14226 from this bug
Comment 8 Bryan Kearney 2016-03-16 06:01:51 EDT
Upstream bug component is Provisioning
Comment 10 David O'Brien 2016-04-17 20:48:38 EDT
Reset docs contact <> daobrien
Comment 11 Bryan Kearney 2016-05-03 12:10:19 EDT
Upstream bug component is Organizations and Locations
Comment 12 Shimon Shtein 2016-05-10 08:04:34 EDT
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 08:13:32 EDT
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 08:32:22 EDT
The message is already in the downstream, see https://bugzilla.redhat.com/show_bug.cgi?id=1207972 .
Comment 15 Kedar Bidarkar 2016-06-17 05:22:08 EDT
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 10.65.209.162 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 05:25 EDT
Created attachment 1169004 [details]
host-group delete message assoc with org
Comment 17 Bryan Kearney 2016-07-27 07:36:21 EDT
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:1501

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