Subscription-Manager re-registration fails during kickstart after rebuilding and existing host

Problem:
After rebuiling an existing host in foreman, the subscription-manager re-registration fails with:
Unit e76239f7-3aac-4f3c-90ac-5d9857d71f47 has been deleted (HTTP error code 410: Gone)

production.log:

RestClient::Gone: Katello::Resources::Candlepin::Consumer: 410 Gone {"displayMessage":"Unit 200254c4-9e86-4afc-8075-8a86c2275a16 has been deleted","requestUuid":"e54b1601-2b41-4ef5-bd51-dd96f98665bc","deletedId":"200254c4-9e86-4afc-8075-8a86c2275a16"} (PUT /candlepin/consumers/200254c4-9e86-4afc-8075-8a86c2275a16)
 688ed430 | Body: {"displayMessage":"Unit 200254c4-9e86-4afc-8075-8a86c2275a16 has been deleted","requestUuid":"e54b1601-2b41-4ef5-bd51-dd96f98665bc","deletedId":"200254c4-9e86-4afc-8075-8a86c2275a16"}
 688ed430 |
2024-10-23T17:08:51 [E|app|688ed430] /usr/share/gems/gems/katello-4.14.0/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb:242:in `consumer_activate'
2024-10-23T17:08:51 [I|app|688ed430]   Rendered text template (Duration: 0.0ms | Allocations: 2)
2024-10-23T17:08:51 [I|app|688ed430] Completed 410 Gone in 482ms (Views: 1.7ms | ActiveRecord: 31.1ms | Allocations: 115985)

candlepin error.log
[thread=https-openssl-nio-127.0.0.1-23443-exec-23] [req=80f81761-2bef-4b9b-83ad-97d1370f73bc, org=, csid=9e18630e-180e-4186-8367-8ccda7c1b771] WARN org.candlepin.resource.util.ConsumerBindUtil - Owner is using simple content access; skipping auto-attach for consumer with activation key: e76239f7-3aac-4f3c-90ac-5d9857d71f47, 7ccb30d5-4535-4262-a09b-f6cb718de895

Expected outcome:
subscription-manager from a rebuilt host was able to re-register without any issues before.

Foreman and Proxy versions:
Foreman 3.12.0

  • katello-4.14.0-1.el9.noarch
  • katello-certs-tools-2.10.0-1.el9.noarch
  • katello-client-bootstrap-1.7.9-2.el9.noarch
  • katello-common-4.14.0-1.el9.noarch
  • katello-repos-4.14.0-1.el9.noarch
  • katello-selinux-5.0.2-1.el9.noarch
  • candlepin-4.4.16-1.el9.noarch
  • candlepin-selinux-4.4.16-1.el9.noarch

Other relevant data:

Im experiencing the same issue.

Hi, this is a known issue. We looked at it from the Candlepin side and it looks like Katello, during re-registration, is deleting the system in Candlepin, and then trying to update it (which is why you see that error), instead of creating a new one after deletion

I’ve seen this too. Running registration twice seems to work around this for me.

This looks like an issue with katello 4.14 I’ve downgraded a dev build to 4.13 and re-registration works as expected. We are also running the registration twice in our production build as a work around. Hopefully this gets resolved in the next version.

We just updated to Katello 4.14, and started getting this too. Is there a reported issue and/or fix for this yet?

Oh, just seen this from the 4.15 release notes:

Katello tries to update the deleted Candlepin consumer during force register after deleting certificates

Project people that are here, will the 4.15 fix get a backport to 4.14.x ?

The target version is currently 4.15.0 which means it’s not slated for any backports. However, 4.15 is GA now so feel free to upgrade :slight_smile:

Except that’s a very fresh release, and people need to upgrade to EL9 before they can do that upgrade…

1 Like

Looking at the PR, I might just manually patch our instance.

Just applied the PR by hand, and it looks to have fixed our issues. We can now auto-deploy servers again.

1 Like

I think it is a small fix for a big issue, so in my opinion a good candidate for a backport. How do you think about it @jeremylenz ?

I wouldn’t be opposed, but it’s up to the Katello 4.14 release owner. We just wrapped up 4.14.2 and had not planned any additional z-streams yet. But if enough people need it we can.

Could you post what patch you used?
I tried the #37966 patch and that did not work.

I applied the changes to app/services/katello/registration_manager.rb in this PR:

1 Like

I’ll try the patch (thanks @John_Beranek), we’re in a mass provisioning/reprovisioning state here and this has been a major unexpected impediment. I upgraded from 3.9 to 3.12 at the end of December, and haven’t bumped to 3.13 because of the RHEL 9 base requirement.

I would greatly appreciate this backported, @cintrix84/@pcreech!

We will get a Katello 4.14.3 out next week

2 Likes

Katello 4.14.3 release procedure gem is built, just waiting on the delivery team to get the rpms made etc. Should be this week with a new release.

1 Like