Bug 1418892

Summary: Unify hosts task can delete live managed virtual machines
Product: Red Hat Satellite Reporter: Justin Sherrill <jsherril>
Component: InstallationAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.2.7CC: bbuckingham, bkearney, cdonnell, jcallaha, jsherril, katello-qa-list, kdixon, mmccune, oshtaier, pdwyer, satellite6-bugs, sauchter, stbenjam, zhunting
Target Milestone: UnspecifiedKeywords: PrioBumpGSS, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.0.0.115-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1418890
: 1426418 (view as bug list) Environment:
Last Closed: 2017-05-01 13:58:59 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: 1418890    
Bug Blocks: 1316897, 1426418    

Comment 2 Justin Sherrill 2017-02-03 16:15:37 UTC
Created redmine issue http://projects.theforeman.org/issues/18388 from this bug

Comment 4 Satellite Program 2017-02-03 17:19:02 UTC
Upstream bug assigned to jsherril

Comment 5 Satellite Program 2017-02-03 17:19:07 UTC
Upstream bug assigned to jsherril

Comment 6 Satellite Program 2017-02-12 09:20:32 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18388 has been resolved.

Comment 9 Satellite Program 2017-02-23 21:11:39 UTC
Please add verifications steps for this bug to help QE verify

Comment 11 jcallaha 2017-03-30 19:14:18 UTC
I registered a vmware host to satellite, along with it being reported by virt-who. I then shortened its hostname. Next, I associated the host to it's corresponding vm in the compute resource, and made it managed by satellite. Then, I created/registered a new host with a hostname that is an expansion of the first host's short name. 

At this point, I ran the unify hosts task. As a result, the hosts were correctly not unified.

Comment 12 jcallaha 2017-03-30 20:02:39 UTC
Continuing, I unregistered the original host and managed the second, then re-ran the command.

-bash-4.1# foreman-rake katello:unify_hosts USE_NAME=true
...
Host dhcp-10-12-211-60.fake.domain.com is registered with subscription-manager but is managed, please un-unmanage this host first.

Verified in Satellite 6.2.9 Snap 2.

Comment 14 errata-xmlrpc 2017-05-01 13:58:59 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-2017:1191