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
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)
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
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.
Hi @Pino No problem! I've edited the text accordingly. Has also been acked by peer-review. Setting rdt to + :)
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