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 2017795 - [RFE]: Disallow manual subscription attachment in SCA mode
Summary: [RFE]: Disallow manual subscription attachment in SCA mode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: subscription-manager
Version: 8.5
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Pino Toscano
QA Contact: Red Hat subscription-manager QE Team
Jacob Taylor Valdez
URL:
Whiteboard:
Depends On:
Blocks: 2023257 2182768
TreeView+ depends on / blocked
 
Reported: 2021-10-27 12:44 UTC by Nikos Moumoulidis
Modified: 2023-03-30 13:42 UTC (History)
5 users (show)

Fixed In Version: subscription-manager-1.28.25-1.el8
Doc Type: Enhancement
Doc Text:
.`subscription-manager` no longer allows manually attaching subscriptions to systems registered in Simple Content Access mode. Previously, the ability to manually attach subscriptions in Simple Content Access (SCA) mode was enabled to ensure a smooth transition of users and systems from Entitlement mode to SCA mode. Currently, there is no need to manually attach a subscription to a system in SCA mode. With this upgrade, the `subscription-manager` ignores requests to attach subscriptions in systems registered in SCA mode. ---- # subscription-manager attach --pool=<_pool_ID_> Ignoring request to attach. It is disabled for org "_12345_" because of the content access mode setting. ----
Clone Of:
: 2023257 2182768 (view as bug list)
Environment:
Last Closed: 2022-05-10 15:22:57 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 2912 0 None Merged [1.28] 2017795: Disallowed attaching pool in SCA mode: 2022-02-02 07:20:49 UTC
Red Hat Issue Tracker RHELPLAN-100884 0 None None None 2021-10-27 12:46:34 UTC
Red Hat Product Errata RHBA-2022:2047 0 None None None 2022-05-10 15:23:14 UTC

Description Nikos Moumoulidis 2021-10-27 12:44:11 UTC
Description of problem:
Allowing the manual attachment of subscriptions while in SCA mode was a decision that would make for a smoother transition from Entitlement for users, but we are at a point that this is no longer needed.

Auto-attaching has already been disabled at the Candlepin & subscription-manager level, and Satellite 6.9+ has already disabled attaching subscriptions to hosts while in SCA mode from the Satellite UI.

Disallowing the attachment of subscriptions at the Candlepin API level by throwing a descriptive error is the next natural step.

Version-Release number of selected component (if applicable):
All current subman versions

How reproducible:
100%

Steps to Reproduce:
1. Register a client to an Org that is in SCA mode.
2. Run 'subscription-manager attach --pool=<pool id for subscription X>'  to attach a specific pool

Actual results:
"Successfully attached a subscription for: X"

Expected results:
A descriptive error returned similar to the one of auto-attach, e.g. "Ignoring request to attach entitlements. It is disabled for org "Default_Organization" because of the content access mode setting."

Additional info:
The corresponding bug on the Candlepin side to disable this at the API level is 2017774

Comment 2 Nikos Moumoulidis 2021-11-09 14:50:55 UTC
We should probably also show this descriptive message when someone is registering with an activation key that has pools/products specified on it. (since Candlepin will start ignoring those values on the AK; see 2018469)

Comment 6 Zdenek Petracek 2021-12-16 11:54:49 UTC
Version:
[root@kvm-04-guest15 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.2.21-1
subscription management rules: 5.41
subscription-manager: 1.28.24-1.git.37.8a08c55.el8

Pre-verification 1:

[root@kvm-04-guest15 ~]# subscription-manager register
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: zpetracePH03
Password: 
The system has been registered with ID: b633a1c7-ee49-4e84-9064-fc9793b28e3f
The registered system name is: kvm-04-guest15.hv2.lab.eng.bos.redhat.com

[root@kvm-04-guest15 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Disabled
Content Access Mode is set to Simple Content Access. This host has access to content, regardless of subscription status.

System Purpose Status: Disabled

[root@kvm-04-guest15 ~]# subscription-manager list --available | grep Pool
Pool ID:             8a99f9ac7b5ee892017bc59cbab16930
Pool ID:             8a99f9ac7b5ee892017bc59f5c236932
Pool ID:             8a99f9ad7bca8239017bdf952e2e051d
Pool ID:             8a99f9ad7bca8239017bdf952e77051f
Pool ID:             8a99f9ad7bca8239017bdf954e010521
[root@kvm-04-guest15 ~]# subscription-manager attach --pool=8a99f9ac7b5ee892017bc59f5c236932
Ignoring request to attach. It is disabled for org "13281785" because of the content access mode setting.

[root@kvm-04-guest15 ~]# subscription-manager list --consumed
No consumed subscription pools were found.

Pre-verification 2:

[root@kvm-04-guest15 ~]# subscription-manager register --activationkey=******* --org=*****
The system has been registered with ID: 4b19a388-c5b8-4c67-badd-4b874572995d
The registered system name is: kvm-04-guest15.hv2.lab.eng.bos.redhat.com

[root@kvm-04-guest15 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Disabled
Content Access Mode is set to Simple Content Access. This host has access to content, regardless of subscription status.

System Purpose Status: Disabled

[root@kvm-04-guest15 ~]# subscription-manager attach --pool=8a99f9ac7b5ee892017bc59f5c236932
Ignoring request to attach. It is disabled for org "*****" because of the content access mode setting.


Man page:
ATTACH OPTIONS
       The attach command applies a specific subscription to the system. This command is not possible  to  use,  when
       the content access mode of the organization to which the system is registered is simple content access mode.

^^ pre-verification PASSED

Comment 11 Zdenek Petracek 2022-01-12 13:04:00 UTC
Version:
[root@kvm-04-guest06 rhsm]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.2.21-1
subscription management rules: 5.41
subscription-manager: 1.28.25-1.git.9986.a2dead8.el8

registering:
[root@kvm-04-guest06 rhsm]# subscription-manager register
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: zpetracePH03
Password: 
The system has been registered with ID: 10d09d80-ccce-4c0b-b26e-cac2a7ee77e0
The registered system name is: kvm-04-guest06.lab.eng.rdu2.redhat.com

[root@kvm-04-guest06 rhsm]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Disabled
Content Access Mode is set to Simple Content Access. This host has access to content, regardless of subscription status.

System Purpose Status: Disabled

Verification 1:
[root@kvm-04-guest06 rhsm]# subscription-manager list --available | grep Pool
Pool ID:             8a99f9ac7b5ee892017bc59cbab16930
Pool ID:             8a99f9ac7b5ee892017bc59f5c236932
Pool ID:             8a99f9ad7bca8239017bdf952e2e051d
Pool ID:             8a99f9ad7bca8239017bdf952e77051f
Pool ID:             8a99f9ad7bca8239017bdf954e010521

[root@kvm-04-guest06 rhsm]# subscription-manager attach --pool=8a99f9ac7b5ee892017bc59f5c236932
Ignoring request to attach. It is disabled for org "13281785" because of the content access mode setting.

Verification 2:
[root@kvm-04-guest06 ~]# subscription-manager register --activationkey=activationkey1 --org=13281785
The system has been registered with ID: fab9b632-b3b8-4d85-8c67-f994c14f903d
The registered system name is: kvm-04-guest06.lab.eng.rdu2.redhat.com

[root@kvm-04-guest06 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Disabled
Content Access Mode is set to Simple Content Access. This host has access to content, regardless of subscription status.

System Purpose Status: Disabled

[root@kvm-04-guest06 ~]# subscription-manager attach --pool=8a99f9ac7b5ee892017bc59cbab16930
Ignoring request to attach. It is disabled for org "13281785" because of the content access mode setting.

[root@kvm-04-guest06 ~]# subscription-manager list --consumed
No consumed subscription pools were found.

[root@kvm-04-guest06 rhsm]# subscription-manager list --consumed
No consumed subscription pools were found.

Comment 16 Jacob Taylor Valdez 2022-03-30 07:56:50 UTC
Hi @Pino

No problem! I've edited the text accordingly. Has also been acked by peer-review. Setting rdt to + :)

Comment 18 errata-xmlrpc 2022-05-10 15:22:57 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-2022:2047


Note You need to log in before you can comment on or make changes to this bug.