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 1831082

Summary: When user tries to auto-attach on a system(registered to org that has 'Content Access Mode' is set to 'Simple Content Access') throw appropriate message
Product: Red Hat Enterprise Linux 8 Reporter: Rehana <redakkan>
Component: subscription-managerAssignee: Jiri Hnidek <jhnidek>
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: low Docs Contact:
Priority: high    
Version: 8.3CC: arpandey, candlepin-bugs, jhnidek, jsefler, qianzhan, redakkan, rhsm-qe, skallesh, wpoteat
Target Milestone: rcKeywords: Triaged
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1826300 Environment:
Last Closed: 2021-05-18 13:32:41 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: 1826300    
Bug Blocks:    

Comment 3 Archana Pandey 2020-10-20 12:08:55 UTC
Early Testing:
Reproducer:
[root@ibm-x3650m4-01-vm-02 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.2.0-1
subscription management rules: 5.41
subscription-manager: 1.27.16-1.el8

[root@ibm-x3650m4-01-vm-02 ~]# subscription-manager register --username ***** --password *****  --org snowwhite --serverurl archana-candlepin.usersys.redhat.com:8443/candlepin
Registering to: archana-candlepin.usersys.redhat.com:8443/candlepin
The system has been registered with ID: 90a7a89c-f45d-4112-8f31-b201301a8ab2
The registered system name is: ibm-x3650m4-01-vm-02.ibm2.lab.eng.bos.redhat.com

[root@ibm-x3650m4-01-vm-02 ~]# subscription-manager attach --auto
All installed products are covered by valid entitlements. No need to update subscriptions at this time.
[root@ibm-x3650m4-01-vm-02 ~]#   ^^^^ appropriate message needs to be shown

==========================================================================================================================

verifying fix on master scratch build : subscription-manager-1.28.4-1.git.4.9e791e4.el8.x86_64
[root@ibm-x3650m4-01-vm-02 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.2.0-1
subscription management rules: 5.41
subscription-manager: 1.28.4-1.git.4.9e791e4.el8

[root@ibm-x3650m4-01-vm-02 ~]# subscription-manager register --username ***** --password *****  --org snowwhite --serverurl archana-candlepin.usersys.redhat.com:8443/candlepin
Registering to: archana-candlepin.usersys.redhat.com:8443/candlepin
The system has been registered with ID: 7eba257b-a0e7-45da-819a-24f88d6f313d
The registered system name is: ibm-x3650m4-01-vm-02.ibm2.lab.eng.bos.redhat.com
[root@ibm-x3650m4-01-vm-02 ~]# 
[root@ibm-x3650m4-01-vm-02 ~]# subscription-manager attach --auto
Ignoring request to auto-attach. It is disabled for organization: "Snow White", because Simple Content Access is in use.
                                   ^^^-----Message updated with Org name, can be updated with org id to match response 
                                           incase of --auto-attach

Trying with option –auto-attach: 
[root@ibm-x3650m4-01-vm-02 ~]# subscription-manager register --username testuser1 --password password  --org snowwhite --auto-attach --force
Unregistering from: archana-candlepin.usersys.redhat.com:8443/candlepin
The system with UUID 7eba257b-a0e7-45da-819a-24f88d6f313d has been unregistered
All local data removed
Registering to: archana-candlepin.usersys.redhat.com:8443/candlepin
The system has been registered with ID: 1ac90c4e-5656-43e2-9cf2-60c4dcce99f5
The registered system name is: ibm-x3650m4-01-vm-02.ibm2.lab.eng.bos.redhat.com
Ignoring request to auto-attach. It is disabled for org "snowwhite" because of the content access mode setting.
                                                         ^^^^----org-id used here, also the message is different

Comment 6 Archana Pandey 2020-11-19 13:56:09 UTC
Early Testing:

Verifying on development build with subscription-manager: 1.28.6-1.el8

Version-Release number of selected component (if applicable):
 Beaker Test information:
                         HOSTNAME=ibm-x3650m4-01-vm-14.ibm2.lab.eng.bos.redhat.com
                            JOBID=4739719
                         RECIPEID=9075527
                    RESULT_SERVER=
                           DISTRO=RHEL-8.4.0-20201118.d.3
                     ARCHITECTURE=x86_64
[root@ibm-x3650m4-01-vm-14 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.2.0-1
subscription management rules: 5.41
subscription-manager: 1.28.6-1.el8

Verification steps:
[root@ibm-x3650m4-01-vm-14 ~]# rpm -qa --changelog subscription-manager | grep 1831082
- 1831082: Better messages for attach --auto for SCA mode; ENT-3175

[root@ibm-x3650m4-01-vm-14 ~]#  subscription-manager register --username **** --password ****  --org snowwhite --serverurl archana-candlepin.usersys.redhat.com:8443/candlepin
Registering to: archana-candlepin.usersys.redhat.com:8443/candlepin
The system has been registered with ID: 72647b56-4a5c-4ebc-9b3e-be111d92b272
The registered system name is: ibm-x3650m4-01-vm-14.ibm2.lab.eng.bos.redhat.com

[root@ibm-x3650m4-01-vm-14 ~]# subscription-manager attach --auto
Ignoring request to auto-attach. It is disabled for org "snowwhite" because of the content access mode setting.

Actual results:
Ignoring request to auto-attach. It is disabled for org "snowwhite" because of the content access mode setting.

Expected results:
Ignoring request to auto-attach. It is disabled for org "snowwhite" because of the content access mode setting.

Based on above results moving verified field to tested.

Comment 11 Archana Pandey 2020-11-25 09:58:43 UTC
verifying on subscription-manager-1.28.6-1.el8.x86_64

Version-Release number of selected component (if applicable):
         Beaker Test information:
                         HOSTNAME=kvm-02-guest12.hv2.lab.eng.bos.redhat.com
                            JOBID=4753197
                         RECIPEID=9096545
                    RESULT_SERVER=
                           DISTRO=RHEL-8.4.0-20201125.n.0
                     ARCHITECTURE=x86_64

[root@kvm-02-guest12 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.2.0-1
subscription management rules: 5.41
subscription-manager: 1.28.6-1.el8

Verification steps: 
[root@kvm-02-guest12 ~]# rpm -qa --changelog subscription-manager | grep 1831082
- 1831082: Better messages for attach --auto for SCA mode; ENT-3175

[root@kvm-02-guest12 ~]# subscription-manager register --username testuser1 --password password  --org snowwhite --serverurl archana-candlepin.usersys.redhat.com:8443/candlepin
Registering to: archana-candlepin.usersys.redhat.com:8443/candlepin
The system has been registered with ID: 66c36d40-d3dc-4972-94cd-b47f1380fc6e
The registered system name is: kvm-02-guest12.hv2.lab.eng.bos.redhat.com
[root@kvm-02-guest12 ~]# 
[root@kvm-02-guest12 ~]# subscription-manager attach --auto
Ignoring request to auto-attach. It is disabled for org "snowwhite" because of the content access mode setting.
[root@kvm-02-guest12 ~]#

Actual results:
Ignoring request to auto-attach. It is disabled for org "snowwhite" because of the content access mode setting.

Expected results:
Ignoring request to auto-attach. It is disabled for org "snowwhite" because of the content access mode setting.

Comment 14 errata-xmlrpc 2021-05-18 13:32:41 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-2021:1575