Description of problem: Under some situations when dealing with the duplicate host problem, one or both of the hosts do not have a mac address. This makes the existing unify_hosts script not work properly since it is based on mac addresses for safety. We need a way to run it based purely on hostnames. Its not clear how to get into this situation. Version-Release number of selected component (if applicable): 6.2.2
Created redmine issue http://projects.theforeman.org/issues/17122 from this bug
Upstream bug assigned to jsherril
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17122 has been resolved.
Verified in Satellite 6.2.7 Snap 1.0 I used a customer database to test this: 1. `foreman-rake katello:unify_hosts` is run as part of the satellite upgrade process and it removed few duplicate hosts. 2. I ran `foreman-rake katello:unify_hosts USE_NAME=true` - It unified 18 hosts. 3. Also in the process I tested with option `DRYRUN=true` - It worked great just listing the affected hosts without making the database. 4. Note: I had 20 shortnamed hosts without the corresponding longnamed host entries, so I fixed them manually.
@Justin: Can you check if you are okay with the verification steps in Comment 8.
Yep, that looks good!
Thank you Justin. Verified in Satellite 6.2.7 Snap 1.0
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:0197