Red Hat Bugzilla – Bug 1605188
Regression of Bug 1575113 - Host registration fails with the error: "Validation failed: Host has already been taken"
Last modified: 2018-08-23 14:42:24 EDT
Description of problem: Try to register again not correctly removed host ends with "Validation failed: Host has already been taken" Version-Release number of selected component (if applicable): Satellite 6.3.2 How reproducible: Not sure Steps to Reproduce: 1. Host was already removed from candlepin and pulp DB 2. Manually removed from foreman DB 3. Re-registration Actual results: "Validation failed: Host has already been taken Expected results: Successful registration. Additional info: Solved by applying https://access.redhat.com/solutions/3436541, with small changes according to difference between 6.3.1 and 6.3.2
Can you provide the exact steps you took for: 1. Host was already removed from candlepin and pulp DB 2. Manually removed from foreman DB
1. I cannot because when customer created the case it was already missing from candlepin and pulp DB 2. su - postgres -c "psql foreman" delete from host_status where host_id = x; delete from katello_subscription_facet_activation_keys where subscription_facet_id = y; delete from katello_subscription_facets where host_id = x; delete from nics where host_id = x; delete from hosts where id = x;
Jan, Your comment in the case: After some investigation we found out that changes which should be present in your version are not, i applied those changes into your code and we tested functionality, registration seems to work, please feel free to test it more. I will discuss with developers why is this part of code not applied. makes me think they weren't actually fully on 6.3.2. Can you have them upload a foreman-debug?
Justin, i checked on the server file /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.4.5.74/app/services/katello/registration_manager.rb which as far as i know is the only file relevant to this issue, it came from tfm-rubygem-katello-3.4.5.74-1.el7sat.noarch.rpm which correspond to https://access.redhat.com/errata/RHBA-2018:1950
You guys are correct, this change is completely missing from 6.3.2 (and 6.3.3) it appears that there was some issue with the release that caused this fix to be missed. Coupled with the fact that we could never reproduce internally, our qe wasn't able to catch it. I will work with our release team to correct the problem.
Upstream bug assigned to jsherril@redhat.com
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/23516 has been resolved.
*** Bug 1599700 has been marked as a duplicate of this bug. ***
Verified in Satellite 6.3.3 Snap 2. I performed over 4000 host registrations, and did not encounter this issue. Additionally, I checked the file and the expected changes are in place. -bash-4.2# find / -name registration_manager.rb /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.4.5.78/app/services/katello/registration_manager.rb -bash-4.2# -bash-4.2# catline 99 /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.4.5.78/app/services/katello/registration_manager.rb host.subscription_facet.update_subscription_status(::Katello::SubscriptionStatus::UNKNOWN)
I'm in the process of testing Satellite 6.3 in our environment, is there a way I could test that update in our environment? It'd make my life a lot easier getting it approved. Logan
Logan, can you open a Red Hat support case and email me with the case# to mmccune @ redhat.com I'll get you the RPMs.
Case# 02153260
I no longer experience the issue after installing the RPMs. Thank you
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-2018:2550