-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
redhat_subscription: stop manual unsubscribing on unregistration #9578
redhat_subscription: stop manual unsubscribing on unregistration #9578
Conversation
1cf9888
to
ad2e63f
Compare
Should the code be conditional then? e.g. if subman_version < X.Y:
rhsm.unsubscribe()
rhsm.unregister() ? That is - if I am a customer using this module to manage an EL9 and an EL10 system, how should I code my play to work correctly on both of those systems? Am I correct in assuming that it is correct to do the |
No, it shouldn't be needed, that's why I simply dropped the call. |
Hi @ptoscano would care to expand? The concern expressed by @richm seems legit: AFAICT this will break backward compatibility for people using the module in RHEL9 or earlier. But I have not tested that. |
No, it will not break anything. Unregistering removes all the bits of a system from the registration server, so removing some manually first is a redundant step. This is even in very old RHEL's documentation:
Emphasis mine on "removes any subscriptions", which is what |
Unregistering a system also drops all the resources for it automatically, so there is no need to manually unsubscribing (which actually means removing all the subscriptions). In addition to that, newer versions of subscription-manager drop all the support for entitlements, so the "remove" subcommand (used by unsubscribe()) does not exist anymore, and thus the unregistration fails with those versions. This fixes the registration on EL 10 systems, and Fedora 41 and greater.
ad2e63f
to
795e5c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifying. In that case, it LGTM.
Backport to stable-9: 💚 backport PR created✅ Backport PR branch: Backported as #9589 🤖 @patchback |
Unregistering a system also drops all the resources for it automatically, so there is no need to manually unsubscribing (which actually means removing all the subscriptions). In addition to that, newer versions of subscription-manager drop all the support for entitlements, so the "remove" subcommand (used by unsubscribe()) does not exist anymore, and thus the unregistration fails with those versions. This fixes the registration on EL 10 systems, and Fedora 41 and greater. (cherry picked from commit bcc92e8)
Backport to stable-10: 💚 backport PR created✅ Backport PR branch: Backported as #9590 🤖 @patchback |
Unregistering a system also drops all the resources for it automatically, so there is no need to manually unsubscribing (which actually means removing all the subscriptions). In addition to that, newer versions of subscription-manager drop all the support for entitlements, so the "remove" subcommand (used by unsubscribe()) does not exist anymore, and thus the unregistration fails with those versions. This fixes the registration on EL 10 systems, and Fedora 41 and greater. (cherry picked from commit bcc92e8)
…al unsubscribing on unregistration (#9589) redhat_subscription: stop manual unsubscribing on unregistration (#9578) Unregistering a system also drops all the resources for it automatically, so there is no need to manually unsubscribing (which actually means removing all the subscriptions). In addition to that, newer versions of subscription-manager drop all the support for entitlements, so the "remove" subcommand (used by unsubscribe()) does not exist anymore, and thus the unregistration fails with those versions. This fixes the registration on EL 10 systems, and Fedora 41 and greater. (cherry picked from commit bcc92e8) Co-authored-by: Pino Toscano <[email protected]>
…ual unsubscribing on unregistration (#9590) redhat_subscription: stop manual unsubscribing on unregistration (#9578) Unregistering a system also drops all the resources for it automatically, so there is no need to manually unsubscribing (which actually means removing all the subscriptions). In addition to that, newer versions of subscription-manager drop all the support for entitlements, so the "remove" subcommand (used by unsubscribe()) does not exist anymore, and thus the unregistration fails with those versions. This fixes the registration on EL 10 systems, and Fedora 41 and greater. (cherry picked from commit bcc92e8) Co-authored-by: Pino Toscano <[email protected]>
SUMMARY
Unregistering a system also drops all the resources for it automatically, so there is no need to manually unsubscribing (which actually means removing all the subscriptions).
In addition to that, newer versions of subscription-manager drop all the support for entitlements, so the "remove" subcommand (used by unsubscribe()) does not exist anymore, and thus the unregistration fails with those versions.
This fixes the registration on EL 10 systems, and Fedora 41 and greater.
ISSUE TYPE
COMPONENT NAME
redhat_subscription