Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #37966 - Rescue Candlepin error during force registration #11199

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

jeremylenz
Copy link
Member

What are the changes introduced in this pull request?

Rescue Candlepin error during force registration
after deleting certs from host. In this situation
Katello tries to update the consumer it just deleted.

Also added a test.

Considerations taken when implementing this change?

This same thing was fixed in #10694 but has since popped up again. I figure a rescue will be more foolproof for next time.

What are the testing steps for this pull request?

See the Redmine issue https://projects.theforeman.org/issues/37966

after deleting certs from host. In this situation
Katello tries to update the consumer it just deleted.
@jeremylenz jeremylenz force-pushed the 37966-rescue-gone-consumer branch from 057b8f0 to 3f7eae9 Compare October 31, 2024 19:52
@lfu
Copy link
Member

lfu commented Nov 6, 2024

Tested with RHEL 9.4.
Issue was re-produced.

[root@ip-10-xxx consumer]# rm -rf /etc/pki/consumer/*
[root@ip-10-xxx consumer]#  echo '' > /var/log/rhsm/rhsm.log
[root@ip-10-xxx consumer]# subscription-manager register --org="Default_Organization" --environment="Library" --force
Registering to: ip-10-xxx.xxx.redhat.com:443/rhsm
Username: admin
Password: 
Unit bf6a1ae8-e140-4b7b-960c-ffb0eb0bc007 has been deleted (HTTP error code 410: Gone)
[root@ip-10-xxx consumer]# echo $?
70

Was able to re-register the client with --force after patch was applied.

[root@ip-10-xxx consumer]# subscription-manager register --org="Default_Organization" --environment="Library" --force
Registering to: ip-10-xxx.xxx.redhat.com:443/rhsm
Username: admin
Password: 
The system has been registered with ID: 03087626-1e0c-43b5-80a2-605ae3bbbae0
The registered system name is: ip-10-xxx.xxx.redhat.com

Copy link
Member

@lfu lfu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏻

@jeremylenz jeremylenz merged commit 80a7683 into Katello:master Nov 6, 2024
26 of 27 checks passed
chris1984 pushed a commit that referenced this pull request Feb 3, 2025
after deleting certs from host. In this situation
Katello tried to update the consumer it just deleted.

(cherry picked from commit 80a7683)
chris1984 pushed a commit that referenced this pull request Feb 3, 2025
after deleting certs from host. In this situation
Katello tried to update the consumer it just deleted.

(cherry picked from commit 80a7683)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants