Bug 2059447

Summary: Support enable_content also for RegisterWithActivationKeys() DBus method
Product: Red Hat Enterprise Linux 9 Reporter: Martin Kolman <mkolman>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED WONTFIX QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.1CC: csnyder, jhnidek, mkolman
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-05 10:39:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Martin Kolman 2022-03-01 03:27:46 UTC
Support for the enable_content property has been added for the Register() DBus method, that makes it possible to register a system with username & password.

If the enable_content property is set to True, auto-attach no longer needs to be called explicitly and Subscription Manager will transparently handle all the necessary calls automatically, including taking care of the registration happening in Simple Content Access mode or legacy Entitlement Mode.

This has the potential to significantly simplify the code of RHSM DBus API clients, such as Anaconda, as no longer multiple APIs will have to be called and just one call will be enough. It will also make it possible to finally drop support for auto-attach being called in SCA mode.

Unfortunately, it looks like so far only the Register() DBus method properly supports the enable_content property, but the other registration method - RegisterWithActivationKeys - does not. This difference in behaviour would be quite a significant problem for Anaconda, as the old complicated behaviour would have to be kept for RegisterWithActivationKeys() and the new one supported for Register().

The lack of proper support for enable_content is apparently somehow related to auto-attach behavior/flag of some activation keys:


"When D-Bus method RegisterWithActivationKeys() is used, then
enable_content is ignored, because it auto-attach cannot be
used together with activation keys"


Anaconda has been always calling auto-attach after *every* RegisterWithActivationKeys() call (as well as after every Register() call) since RHEL 8.2, without any known issues being reporter as the result of this behaviour. Also as far as I know while some activation keys can have the auto-attach flag set (thus auto-attach already happens for these keys at registration time & we have seen this happen on real systems), there are also real keys that do not have this flag set and without auto-attach being used will not result in a properly subscribed system.

This has also been discussed on the regular Anaconda-RHSM-DNF sync meeting, with the conclusion being that there is really nothing preventing RegisterWithActivationKeys() fully supporting enable_content & making the life easier for all RHSM DBus API clients, not just Anaconda.

As an action item from the meeting, I have created this bug to track progress on enable_content being supported by RegisterWithActivationKeys() in the RHSM DBus API.