Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2094942

Summary: [RFE] Improve the error message to users that we ignore attach/auto-attach requests when SCA is enabled.
Product: Red Hat Enterprise Linux 9 Reporter: Rich Jerrido <rjerrido>
Component: subscription-managerAssignee: Jiri Hnidek <jhnidek>
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 9.1CC: byodlows, jhnidek, jsefler, redakkan, zpetrace
Target Milestone: rcKeywords: EasyFix, FutureFeature, Triaged
Target Release: 9.2Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.29.31-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2097670 2097672 (view as bug list) Environment:
Last Closed: 2023-05-09 08:18:42 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:    
Bug Blocks: 2097670, 2097672    

Description Rich Jerrido 2022-06-08 16:45:22 UTC
Description of problem:

When Simple Content Access is enabled, we inform the user that we reject requests to attach/auto-attach due to SCA being enabled. However the error message is potentially unclear to a user who isn't versed in our subscription tooling. 

How reproducible:
100%

Steps to Reproduce:
1. Enable SCA for your org.
2. Register a system
3. Attempt to attach an entitlement or run auto-attach. 

Actual results:

"Ignoring request to attach. It is disabled for org $ORGID because of the content access mode setting."

Proposed results:

"Ignoring the request to attach. Attaching subscriptions is disabled for org $ORGID because simple content access is enabled.

Comment 9 John Sefler 2022-10-05 21:10:15 UTC
Pre-testing (attempts to attach/auto-attach when in sca is enabled should inform us that "Simple Content Access (SCA) is enabled.")....

[root@kvm-04-guest11 ~]# rpm -q subscription-manager
subscription-manager-1.29.30+50.gb31cb8aa0-1.git.0.f090560.x86_64

[root@kvm-04-guest11 ~]# rpm -q --changelog subscription-manager | grep 2094942
- 2094942: Improve warning message (auto-attach in SCA mode)
- 2094942: [RFE] Improve the message, when  SCA is enabled (jhnidek)



CASE register with --auto-attach:

[root@kvm-04-guest11 ~]# subscription-manager register --username=stage_rhsmqe_scauser01 --auto-attach --serverurl=subscription.rhsm.stage.redhat.com
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Password: 
The system has been registered with ID: d6178aae-05da-487b-bd56-948d40edf087
The registered system name is: kvm-04-guest11.hv2.lab.eng.bos.redhat.com
Ignoring the request to auto-attach. Attaching subscriptions is disabled for organization "13267661" because Simple Content Access (SCA) is enabled.
[root@kvm-04-guest11 ~]#  

Verified: Tested



CASE attach --auto:

[root@kvm-04-guest11 ~]# subscription-manager  attach --auto
Ignoring the request to auto-attach. Attaching subscriptions is disabled for organization "13267661" because Simple Content Access (SCA) is enabled.
 
Verified: Tested



Case attach --pool=ID:

[root@kvm-04-guest11 ~]# subscription-manager list --available --pool-only | head -1
2c9456e0825caaa901825e635735039f

[root@kvm-04-guest11 ~]# subscription-manager attach --pool=2c9456e0825caaa901825e635735039f
Ignoring request to attach. It is disabled for org "13267661" because of the content access mode setting.

Verified: FailedQA                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expected:                                                     because Simple Content Access (SCA) is enabled.
or to be more consistent with the auto-attach grammar cases above...
Expected: Ignoring the request to attach. Attaching subscriptions is disabled for organization "13267661" because Simple Content Access (SCA) is enabled.


It looks like the expected message was updated for the auto-attach case, but not the manual attach case.

Comment 10 John Sefler 2022-10-11 12:41:55 UTC
Pre-testing another build...

[root@kvm-01-guest03 ~]# rpm -q subscription-manager
subscription-manager-1.29.30+52.g044e0a551-1.git.0.5176e55.x86_64

[root@kvm-01-guest03 ~]# rpm -q --changelog subscription-manager | grep 2094942
- 2094942: Fixed expected message for manual attach case (jajerome)
- 2094942: Improve warning message (auto-attach in SCA mode)
- 2094942: [RFE] Improve the message, when  SCA is enabled (jhnidek)



CASE register with --auto-attach:

[root@kvm-01-guest03 ~]# subscription-manager register --username=stage_rhsmqe_scauser01 --auto-attach --serverurl=subscription.rhsm.stage.redhat.com
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Password: 
The system has been registered with ID: 80faf75a-d8f9-4395-8611-7d7abf7e1976
The registered system name is: kvm-01-guest03.lab.eng.rdu2.redhat.com
Ignoring the request to auto-attach. Attaching subscriptions is disabled for organization "13267661" because Simple Content Access (SCA) is enabled.

Verified: Tested



CASE attach --auto:

[root@kvm-01-guest03 ~]# subscription-manager  attach --auto
Ignoring the request to auto-attach. Attaching subscriptions is disabled for organization "13267661" because Simple Content Access (SCA) is enabled.

Verified: Tested



Case attach --pool=ID:

[root@kvm-01-guest03 ~]# subscription-manager list --available --pool-only | head -1
2c9456e0825caaa901825e635735039f
[root@kvm-01-guest03 ~]# subscription-manager attach --pool=2c9456e0825caaa901825e635735039f
Ignoring the request to attach. Attaching subscriptions is disabled for organization "13267661" because Simple Content Access (SCA) is enabled.

Verified: Tested


Verified: Tested all three cases report an improved message that "Attaching subscriptions is disabled...because Simple Content Access (SCA) is enabled."

Comment 13 Zdenek Petracek 2022-11-08 13:59:06 UTC
Final verification on SM version:
[root@kvm-02-guest04 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 4.2.10-1
subscription management rules: 5.43
subscription-manager: 1.29.31-1.el9

[root@kvm-02-guest04 ~]# rpm -q --changelog subscription-manager | grep 2094942
- 2094942: Fixed expected message for manual attach case (jajerome)
- 2094942: Improve warning message (auto-attach in SCA mode)
- 2094942: [RFE] Improve the message, when  SCA is enabled (jhnidek)


Verifying --auto-attach option:
[root@kvm-02-guest04 ~]# subscription-manager register --username=zpetracePH03 --auto-attach --serverurl=subscription.rhsm.stage.redhat.comRegistering to: subscription.rhsm.stage.redhat.com:443/subscription
Password: 
The system has been registered with ID: c0d12db0-4df7-46b9-8f3b-12e12b7c1b9e
The registered system name is: kvm-02-guest04.rhts.eng.brq.redhat.com
Ignoring the request to auto-attach. Attaching subscriptions is disabled for organization "13281785" because Simple Content Access (SCA) is enabled.
^^ PASSED


Verifying attach --auto option:
[root@kvm-02-guest04 ~]# subscription-manager attach --auto
Ignoring the request to auto-attach. Attaching subscriptions is disabled for organization "13281785" because Simple Content Access (SCA) is enabled.
^^ PASSED


Verifying poolID option:
[root@kvm-02-guest04 ~]# subscription-manager list --available --pool-only | head -1
2c9453a48356751401835afe2cd20401

[root@kvm-02-guest04 ~]# subscription-manager attach --pool=2c9453a48356751401835afe2cd20401
Ignoring the request to attach. Attaching subscriptions is disabled for organization "13281785" because Simple Content Access (SCA) is enabled.
^^ PASSED

Comment 15 errata-xmlrpc 2023-05-09 08:18:42 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 (subscription-manager 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:2493