Bug 2083319

Summary: Delegate auto-attach handling to RHSM
Product: Red Hat Enterprise Linux 9 Reporter: Martin Kolman <mkolman>
Component: anacondaAssignee: Martin Kolman <mkolman>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.1CC: jkonecny, jstodola, mkolman, sbarcomb
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: anaconda-34.25.2.4-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-09 07:35:38 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:
Bug Depends On: 2101510, 2118962    
Bug Blocks:    
Deadline: 2022-07-12   

Description Martin Kolman 2022-05-09 16:56:42 UTC
It has been agreed with the RHSM team to stop explicitly issuing auto-attach calls in Simple Content access mode in RHEL 8.7 & RHEL 9.1.

Thankfully, this also coincides with the enable_content property being added to the Register() method used for username+password registration, which will make RHSM do the needed steps transparently from the client (eq. Anaconda) point of view. [0]

There is no such property for the RegisterWithActivationKeys(), but this can be handled by enabling auto-attach for the key being used. Attempting to use a key without auto-attach being enabled for it is not expected to work for the installation, so dropping the auto attach call for org + key authentication should not be a problem.

To summarize, the plan is to:

1) stop calling auto-attach
2) for username+password auth use the enable_content property for the Register() call
3) if possible, use data returned by the Register()/RegisterWithActivationKeys(), avoiding the additional GetPools() call, to show subscriptions that have been attached, if any

[0] https://github.com/candlepin/subscription-manager/pull/2860

Comment 5 Martin Kolman 2022-12-14 14:34:38 UTC
PR: https://github.com/rhinstaller/anaconda/pull/4471

Comment 12 Jan Stodola 2023-01-11 16:47:58 UTC
Checked that anaconda-34.25.2.5-1.el9 is in nightly compose RHEL-9.2.0-20230111.33
No regressions have been reported by automated tests.

Moving to VERIFIED

Comment 14 errata-xmlrpc 2023-05-09 07:35:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (anaconda bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2223