Steps to Reproduce:
1. provision a host with activation key
2. after provisioning finishes (and the content host is registered), rebuild the system (Build button + restart of the host)
3. after the re-provisioning happens, the are two content hosts with the same fqdn
Either the content host is unregistered on the re-provisioning or the existing content host is reused at the second time (ideally letting the user to choose
which option they want)
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.
This causes you not to be able to rebuild a host when you are out of valid subscriptions as well.
How Foreman handles Puppet CA may be interesting to look at. When a host requests a provisioning template -- i.e. we know we are *really* rebuilding the host -- they revoke the old key and create a new one. Maybe have it fire off a dynflow action to do something similar to the attached content host.
I believe the changes introduced with Katello PR https://github.com/Katello/katello/pull/4555 (bug 1122736) will address the behavior observed.
With the new behavior, when a content-host is registered, if there is an existing host (w/ same name+mac) and if that host already has a content-host associated, the existing content-host will be deleted and a new one created & associated.
If that is sufficient to address this bug, we can probably close this one as a duplicate or move to ON_QA for testing.
The chnages description really looks like it should handle this situation. Closing. Will reopen if there is something missing that this BZ requires. Thanks for info