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 1841600 - subscription-manager-cockpit : when you register with an activationkey that has some pools/subscriptions on it, entitlements dont get synced down to the system
Summary: subscription-manager-cockpit : when you register with an activationkey that h...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: subscription-manager
Version: 8.3
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: rc
: 8.3
Assignee: Jiri Hnidek
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks: 1842946
TreeView+ depends on / blocked
 
Reported: 2020-05-29 14:17 UTC by Shwetha Kallesh
Modified: 2020-11-04 01:39 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 01:39:09 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Verification with activation key1 (279.13 KB, image/png)
2020-08-07 11:51 UTC, Shwetha Kallesh
no flags Details
Verification for case 2 (293.45 KB, image/png)
2020-08-07 11:52 UTC, Shwetha Kallesh
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 2290 0 None closed 1841600: D-Bus - update ent. cert., when act. key is used; ENT-2453 2020-09-07 08:09:13 UTC
Red Hat Product Errata RHBA-2020:4460 0 None None None 2020-11-04 01:39:33 UTC

Description Shwetha Kallesh 2020-05-29 14:17:06 UTC
Description of problem:

subscription-manager-cockpit : when you register with an activationkey that has some pools/subscriptions on it, entitlements dont get synced down to the system

Version-Release number of selected component (if applicable):
[root@kvm-06-guest02 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.1.11-1
subscription management rules: 5.39
subscription-manager: 1.27.4


How reproducible:


Steps to Reproduce:
1.create an activation-key , add some pools to it
[shwetha@localhost rhsm-qe]$ curl -k --request POST --user ***:*** --data '{"name":"autoTrue1","autoAttach":"true"}' --header 'accept: application/json' --header 'content-type: application/json' https://subscription.rhsm.stage.redhat.com:443/subscription/owners/12814047/activation_keys | python -mjson.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   466    0   426  100    40     88      8  0:00:05  0:00:04  0:00:01   107
{
    "addOns": [],
    "autoAttach": true,
    "contentOverrides": [],
    "created": "2020-05-29T12:37:10+0000",
    "description": null,
    "id": "8a99f9a0723193b30172606fabce2bd5",
    "name": "autoTrue1",
    "owner": {
        "displayName": "12814047",
        "href": "/owners/12814047",
        "id": "8a99f9ae6e3a9cac016e3b641dbc000f",
        "key": "12814047"
    },
    "pools": [],
    "products": [],
    "releaseVer": {
        "releaseVer": null
    },
    "role": null,
    "serviceLevel": null,
    "updated": "2020-05-29T12:37:10+0000",
    "usage": null
}

[shwetha@localhost rhsm-qe]$ curl -k --request POST --user ****:**** https://subscription.rhsm.stage.redhat.com:443/subscription/activation_keys/8a99f9a0723193b30172606fabce2bd5/pools/8a99f9ae6e3a9cac016e3b677d1b00c3 | python -mjson.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   608    0   608    0     0     96      0 --:--:--  0:00:06 --:--:--   159
{
    "addOns": [],
    "autoAttach": true,
    "contentOverrides": [],
    "created": "2020-05-29T12:37:10+0000",
    "description": null,
    "id": "8a99f9a0723193b30172606fabce2bd5",
    "name": "autoTrue1",
    "owner": {
        "displayName": "12814047",
        "href": "/owners/12814047",
        "id": "8a99f9ae6e3a9cac016e3b641dbc000f",
        "key": "12814047"
    },
    "pools": [
        {
            "poolId": "8a99f9ae6e3a9cac016e3b677d1b00c3",
            "quantity": null
        }
    ],
    "products": [],
    "releaseVer": {
        "releaseVer": null
    },
    "role": null,
    "serviceLevel": null,
    "updated": "2020-05-29T12:37:10+0000",
    "usage": null
}


2. open cockpit , go to subscriptions tab, click on register button  
3. select the method as "ActivationKey"
4. Enter the activationkey name created above earlier and the organisation
5. once system is registered , on the system open the terminal and verify the consumed list
6. No consumed subscriptions are listed
[root@kvm-06-guest02 ~]# ls /etc/pki/entitlement/
[root@kvm-06-guest02 ~]# subscription-manager list --consumed
No consumed subscription pools were found.

7. yum repolist doesnot list any repos
[root@kvm-06-guest02 ~]# yum repolist --disablerepo=beaker*
Updating Subscription Management repositories.

This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions.

8. Now do a subscription-manager refresh --force
[root@kvm-06-guest02 ~]# subscription-manager refresh --force
All local data refreshed

9. subscription-manager list --consumed will now show the subscriptions in the consumed list and entitlements get synced down
[root@kvm-06-guest02 ~]# ls /etc/pki/entitlement/
5934049742107295418-key.pem  5934049742107295418.pem
[root@kvm-06-guest02 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Beta Access
Provides:            Red Hat Enterprise Linux for Power, little endian Beta
                     Red Hat Enterprise Linux for ARM 64 Beta
                     Red Hat CodeReady Linux Builder for x86_64 Beta
                     Red Hat CodeReady Linux Builder for Power, little endian Beta
                     Red Hat CodeReady Linux Builder for ARM 64 Beta
                     Red Hat Enterprise Linux Fast Datapath Beta for Power, little endian
                     Red Hat Enterprise Linux for SAP HANA for Power, little endian Beta
                     Red Hat Enterprise Linux for x86_64 Beta
                     Red Hat Enterprise Linux for SAP Applications for x86_64 Beta
                     Red Hat Enterprise Linux High Availability Beta
                     Red Hat CodeReady Linux Builder for IBM z Systems Beta
                     Red Hat Enterprise Linux Resilient Storage Beta
                     Red Hat Enterprise Linux for Real Time Beta
                     Red Hat Enterprise Linux for IBM z Systems Beta
                     Red Hat Directory Server Beta
                     Red Hat Enterprise Linux for SAP Applications for Power, little endian Beta
                     Red Hat Certificate System Beta
                     Red Hat Enterprise Linux for SAP Applications for IBM z Systems Beta
                     Red Hat Enterprise Linux for Real Time for NFV Beta
                     Red Hat Enterprise Linux Fast Datapath Beta for x86_64
                     Red Hat Enterprise Linux for SAP HANA for x86_64 Beta
SKU:                 RH00069
Contract:            12034275
Account:             6320620
Serial:              5934049742107295418
Pool ID:             8a99f9ae6e3a9cac016e3b677d1b00c3
Provides Management: No
Active:              True
Quantity Used:       1
Service Type:        L1-L3
Roles:               
Service Level:       Self-Support
Usage:               
Add-ons:             
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              11/05/2019
Ends:                11/04/2020
Entitlement Type:    Physical

Actual results:
entitlements have not been synced down to the system, hence user doesnot have acces to content as yum repolist doesnot list any repos

Expected results:
entitlements should be synced down to the system, hence user should have access to content , yum repolist should list all available repos

Additional info:

Comment 4 Shwetha Kallesh 2020-08-07 11:51:23 UTC
Created attachment 1710790 [details]
Verification with activation key1

Entitlements are synced down when autoAttach = false on the key

[shwetha@localhost ~]$ curl -k --request GET --user stage_auto_syspurpose001:redhat https://subscription.rhsm.stage.redhat.com:443/subscription/owners/12814047/activation_keys | python -mjson.tool | grep "archana_demo" -A22 -B2
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  438k    0  438k    0     0  35909      0 --:--:--  0:00:12 --:--:-- 71481
        "updated": "2020-05-29T13:11:02+0000",
        "id": "8a99f9a3722e78e70172608ba3a804c5",
        "name": "archana_demo",
        "description": null,
        "owner": {
            "id": "8a99f9ae6e3a9cac016e3b641dbc000f",
            "key": "12814047",
            "displayName": "12814047",
            "href": "/owners/12814047"
        },
        "serviceLevel": "Self-Support",
        "usage": null,
        "role": null,
        "addOns": [],
        "autoAttach": false,
        "pools": [
            {
                "poolId": "8a99f9ae6e3a9cac016e3b6525a70015",
                "quantity": null
            },
            {
                "poolId": "8a99f9ae6e3a9cac016e3b677d1b00c3",
                "quantity": null
            }
        ],

Comment 5 Shwetha Kallesh 2020-08-07 11:52:52 UTC
Created attachment 1710791 [details]
Verification for case 2

Entitlements are synced down when autoAttach=null

[shwetha@localhost ~]$ curl -k --request GET --user stage_auto_syspurpose001:redhat https://subscription.rhsm.stage.redhat.com:443/subscription/owners/12814047/activation_keys | python -mjson.tool | grep "Wottop_test_Key" -A22 -B2
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  438k    0  438k    0     0  38018      0 --:--:--  0:00:11 --:--:-- 73439
        "updated": "2020-07-23T14:11:02+0000",
        "id": "8a99f9a9734e6eb101737c035da71f32",
        "name": "Wottop_test_Key",
        "description": null,
        "owner": {
            "id": "8a99f9ae6e3a9cac016e3b641dbc000f",
            "key": "12814047",
            "displayName": "12814047",
            "href": "/owners/12814047"
        },
        "serviceLevel": null,
        "usage": null,
        "role": null,
        "addOns": [],
        "autoAttach": null,
        "pools": [
            {
                "poolId": "8a99f9ae6e3a9cac016e3b677f8800cf",
                "quantity": 1
            },
            {
                "poolId": "8a99f9ae6e3a9cac016e3b677d1b00c3",
                "quantity": 1
            }
        ],

Comment 6 Shwetha Kallesh 2020-08-10 06:20:34 UTC
Based on the verifications in the comment4 and comment5 Moving the bug to verified

[root@hp-moonshot-01-c20 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.1.16-1
subscription management rules: 5.40
subscription-manager: 1.27.13-1.el8

Comment 9 errata-xmlrpc 2020-11-04 01:39:09 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-2020:4460


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