-
Notifications
You must be signed in to change notification settings - Fork 84
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
RHSM: do not use the force
D-Bus registration option
#812
Conversation
The 'force' D-Bus registration option used to simply be not implemented, effectively being a no-op; because of that, the system is manually unregistered before the actual registration. Newer versions of subscription-manager (in 8.8 and 9.2) actually do implement the 'force' option; OTOH, since the system was unregistered before the registration attempt, having the option there does not make any difference. Hence, simply drop the 'force' option altogether. Improve the comment regarding the unregistration to mention the status of the 'force' option, and the general reason for unconditionally unregistering at that point. Signed-off-by: Pino Toscano <ptoscano@redhat.com>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #812 +/- ##
=======================================
Coverage 93.52% 93.52%
=======================================
Files 24 24
Lines 3350 3350
Branches 589 589
=======================================
Hits 3133 3133
Misses 152 152
Partials 65 65
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
/packit test |
Change looks good to me, just waiting on integration tests to pass |
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.
Change looks good to me!
It's been a while since i looked at this (and I'm at pycon until the 28th
so i can't look closely at it) but i think the unregister was just a
workaround for force not working. So we'd rather keep force and remove the
unregistration.
Of course, that might not be sufficient since we never tested that with
force working via dbus. and I don't know if that will work on all the
versions of rhel clones (latest 7, latest centos 7, latest 8, and the eus 8
releases, latest 9 and eus 9 releases) that we care about. So relying
solely on force might not be enough.
@mbocek might also remember this discussion and be able to decide if we
want to do it this way while i am at pycon.
|
This change is the outcome of these two BZs about the force option not working through the dbus API: There's no BZ for RHEL 7 and I believe that even if there was one it would be rejected. RHEL 7 is not being worked on anymore except critical bugs. As the sub-man is not going to be fixed on RHEL 7, we need to keep un-registering the system ourselves until we stop allowing conversions of RHEL 7 in the tool altogether. To improve the user experience at least on RHEL 8+, we can use the force option on RHEL 8+ to save one dbus API call, leading to a (perhaps) faster conversion and less info log messages. @abadger, WDYT about that? |
Considering that the current
Nah, it does not really buy you anything. The slowest parts in the runtime of subscription-manager are the network interactions with the registration server (whose time you can count in seconds), you can try yourself how much time a If you really wanted to use the TL;DR: keep the current way, it's easier for convert2rhel. |
Ah, you got me :)
I'm ok with that. |
friendly ping ;) |
force
D-Bus registration option
The 'force' D-Bus registration option used to simply be not implemented, effectively being a no-op; because of that, the system is manually unregistered before the actual registration. Newer versions of subscription-manager (in 8.8 and 9.2) actually do implement the 'force' option; OTOH, since the system was unregistered before the registration attempt, having the option there does not make any difference. Hence, simply drop the 'force' option altogether. Improve the comment regarding the unregistration to mention the status of the 'force' option, and the general reason for unconditionally unregistering at that point. Signed-off-by: Pino Toscano <ptoscano@redhat.com>
The 'force' D-Bus registration option used to simply be not implemented, effectively being a no-op; because of that, the system is manually unregistered before the actual registration.
Newer versions of subscription-manager (in 8.8 and 9.2) actually do implement the 'force' option; OTOH, since the system was unregistered before the registration attempt, having the option there does not make any difference. Hence, simply drop the 'force' option altogether.
Improve the comment regarding the unregistration to mention the status of the 'force' option, and the general reason for unconditionally unregistering at that point.
Checklist
[RHELC-]
is part of the PR titleRelease Pending
if relevant