Description of problem: Automated testing is encountering some strange behavior when a consumer of type "candlepin" is registered... 1. Pools with an attribute of "requires_consumer_type" "system" appear in list --available. 2. Attaching one of these pools is granting an entitlement cert Version 1.0 instead of 3.2. 3. Attempting to attach a pool with more than 186 content sets is blocked by "Too many content sets..." Version-Release number of selected component (if applicable): subscription management server: 2.0.3-1 How reproducible: Steps to Reproduce: ISSUE 3: Deploy a local candlepin server with TESTDATA and create a subscription (mktProductId-186) that provides more than 185 content sets (not shown). [root@jsefler-rhel7 ~]# subscription-manager version server type: Red Hat Subscription Management subscription management server: 2.0.3-1 <========== FAILING CANDLEPIN subscription management rules: 5.16 subscription-manager: 1.19.14-1.el7 python-rhsm: 1.19.6-1.el7 [root@jsefler-rhel7 ~]# subscription-manager register --type=candlepin Registering to: jsefler-candlepin.usersys.redhat.com:8443/candlepin Username: admin Password: Organization: admin The system has been registered with ID: fa9f1d5d-674f-42af-9d21-38afb0ead8c1 [root@jsefler-rhel7 ~]# subscription-manager facts | grep certificate_version system.certificate_version: 3.2 [root@jsefler-rhel7 ~]# subscription-manager list --avail --matches mktProductId-186 +-------------------------------------------+ Available Subscriptions +-------------------------------------------+ Subscription Name: Subscription providing a 186 ContentSet Product Provides: 186 ContentSet Product SKU: mktProductId-186 Contract: 1055248431 Pool ID: 8a90860f5c3c7a59015c3c7f411815a4 Provides Management: No Available: 20 Suggested: 1 Service Level: Service Type: Subscription Type: Standard Ends: 06/08/2017 System Type: Physical [root@jsefler-rhel7 ~]# subscription-manager attach --pool=8a90860f5c3c7a59015c3c7f411815a4 Too many content sets for certificate Subscription providing a 186 ContentSet Product. A newer client may be available to address this problem. See kbase https://access.redhat.com/knowledge/node/129003 for more information. --------------------------------------------------------------------- While the "Too many content sets..." error seems strange, I cannot think of a good reason for the candlpin consumer to be blocked by "Too many content sets" when the consumer's system.certificate_version is 3.2. The following is also strange... For pools that successfully attach, why is the entilement's certificate version 1.0 instead of 3.2? --------------------------------------------------------------------- ISSUE 2: The entitlement granted to a candlepin consumer type from some other random pool is cert version 1.0 instead of version 3... [root@jsefler-rhel7 ~]# subscription-manager attach --pool=8a90860f5c3c7a59015c3c7bb7930699 Successfully attached a subscription for: Stackable with Awesome OS for x86_64 [root@jsefler-rhel7 ~]# rct cat-cert --no-content --no-products /etc/pki/entitlement/6148911985392350709.pem | grep Version Version: 1.0 <==== EXPECTED 3.2 If I register as type "system" and attach the same pool... [root@jsefler-rhel7 ~]# subscription-manager register --type=system --force Unregistering from: jsefler-candlepin.usersys.redhat.com:8443/candlepin The system with UUID d68cb052-feb4-49dd-a0d9-d5e99afe7557 has been unregistered All local data removed Registering to: jsefler-candlepin.usersys.redhat.com:8443/candlepin Username: admin Password: Organization: admin The system has been registered with ID: b7651942-9b01-40b4-8594-589921927d0b [root@jsefler-rhel7 ~]# subscription-manager attach --pool 8a90860f5c3c7a59015c3c7bb7930699 Successfully attached a subscription for: Stackable with Awesome OS for x86_64 [root@jsefler-rhel7 ~]# rct cat-cert --no-content --no-products /etc/pki/entitlement/2759728590536420713.pem | grep Version Version: 3.2 <==== CORRECT AS EXPECTED ------------------------------------------------------------------- -- Another thing about being registered as type=candlepin that seems strange is that the pools that appears available for consumption all have a "requires_consumer_type" attribute with value "system". So why are they available to my "candlepin" consumer at all? --------------------------------------------------------------------- ISSUE 1: [root@jsefler-rhel7 ~]# curl --stderr /dev/null -k -u admin:admin https://jsefler-candlepin.usersys.redhat.com:8443/candlepin/pools/8a90860f5c3c7a59015c3c7f411815a4 | python -m json/tool { "accountNumber": "1071597241", "activeSubscription": true, "attributes": [], "branding": [], "calculatedAttributes": { "compliance_type": "Standard" }, "cdn": null, "consumed": 0, "contractNumber": "1055248431", "created": "2017-05-24T22:06:31.704+0000", "derivedProduct": null, "derivedProductAttributes": [], "derivedProductId": null, "derivedProductName": null, "derivedProvidedProducts": [], "endDate": "2017-06-08T22:06:31.000+0000", "exported": 0, "href": "/pools/8a90860f5c3c7a59015c3c7f411815a4", "id": "8a90860f5c3c7a59015c3c7f411815a4", "orderNumber": null, "owner": { "displayName": "Admin Owner", "href": "/owners/admin", "id": "8a90860f5c3c7a59015c3c7b30b50004", "key": "admin" }, "product": { "attributes": [ { "created": "2017-05-24T22:05:52.738+0000", "name": "arch", "updated": "2017-05-24T22:05:52.738+0000", "value": "ALL" }, { "created": "2017-05-24T22:05:52.738+0000", <====== "name": "requires_consumer_type", <====== "updated": "2017-05-24T22:05:52.738+0000", <====== "value": "system" <====== SYSTEM }, { "created": "2017-05-24T22:05:52.738+0000", "name": "version", "updated": "2017-05-24T22:05:52.738+0000", "value": "186.0" }, { "created": "2017-05-24T22:05:52.738+0000", "name": "type", "updated": "2017-05-24T22:05:52.738+0000", "value": "MKT" } ], "created": "2017-05-24T22:05:52.738+0000", "dependentProductIds": [], "href": "/owners/admin/products/mktProductId-186", "id": "mktProductId-186", "multiplier": 1, "name": "Subscription providing a 186 ContentSet Product", "owner": { "displayName": "Admin Owner", "href": "/owners/admin", "id": "8a90860f5c3c7a59015c3c7b30b50004", "key": "admin" }, "productContent": [], "updated": "2017-05-24T22:05:52.738+0000", "uuid": "8a90860f5c3c7a59015c3c7ea8e2159a" }, "productAttributes": [ { "created": "2017-05-24T22:05:52.738+0000", "name": "arch", "updated": "2017-05-24T22:05:52.738+0000", "value": "ALL" }, { "created": "2017-05-24T22:05:52.738+0000", "name": "requires_consumer_type", "updated": "2017-05-24T22:05:52.738+0000", "value": "system" }, { "created": "2017-05-24T22:05:52.738+0000", "name": "version", "updated": "2017-05-24T22:05:52.738+0000", "value": "186.0" }, { "created": "2017-05-24T22:05:52.738+0000", "name": "type", "updated": "2017-05-24T22:05:52.738+0000", "value": "MKT" } ], "productId": "mktProductId-186", "productName": "Subscription providing a 186 ContentSet Product", "providedProducts": [ { "productId": "186", "productName": "186 ContentSet Product" } ], "quantity": 20, "restrictedToUsername": null, "sourceConsumer": null, "sourceEntitlement": null, "sourceStackId": null, "stackId": null, "stacked": false, "startDate": "2017-05-23T22:06:31.000+0000", "subscriptionId": "48d9bfc435c94106985f2c991836d1a8", "subscriptionSubKey": "master", "type": "NORMAL", "updated": "2017-05-24T22:06:31.704+0000", "upstreamConsumerId": null, "upstreamEntitlementId": null, "upstreamPoolId": null }
Additional Info from the subscription-manager man page that needs some love... --type=CONSUMERTYPE Sets the type of unit to register. Most units in the inventory will use the default value of system. For development or test units, this can be person , which indicates a personal (rather than organizational) unit. Another type of unit can be candlepin for a local content service or domain for an IP domain.