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 1763271 - Do not list installed products with "Not Subscribed" status when the registration is to an org with contentAccessMode:org_environment
Summary: Do not list installed products with "Not Subscribed" status when the registra...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.8
Hardware: Unspecified
OS: Unspecified
high
low
Target Milestone: rc
: ---
Assignee: Jiri Hnidek
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-18 15:51 UTC by Shwetha Kallesh
Modified: 2020-09-29 19:23 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-29 19:22:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 2230 0 None closed 1763271: Golden ticket: do not print list of products; ENT-2017 2021-02-09 02:14:37 UTC
Red Hat Product Errata RHBA-2020:3866 0 None None None 2020-09-29 19:23:17 UTC

Description Shwetha Kallesh 2019-10-18 15:51:15 UTC
Description of problem:
 Do not list installed products with "Not Subscribed" status when the registration is to an org with contentAccessMode=org_environment

Version-Release number of selected component (if applicable):
[root@kvm-01-guest05 product]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.8.0-1
subscription management rules: 5.37
subscription-manager: 1.24.21-1.el7

How reproducible:


Steps to Reproduce:
[root@kvm-03-guest01 ~]# curl --stderr /dev/null --insecure --user admin:admin --request PUT --data '{"contentAccessMode":"org_environment"}' --header 'accept: application/json' --header 'content-type: application/json' https://shwetha-workstation.usersys.redhat.com:8443/candlepin/owners/snowwhite
{
  "created" : "2019-10-15T09:48:19+0000",
  "updated" : "2019-10-18T09:01:02+0000",
  "id" : "8ac6a3a96dced151016dced17ec10003",
  "key" : "snowwhite",
  "displayName" : "Snow White",
  "parentOwner" : null,
  "contentPrefix" : null,
  "defaultServiceLevel" : null,
  "upstreamConsumer" : null,
  "logLevel" : null,
  "autobindDisabled" : false,
  "contentAccessMode" : "org_environment",
  "contentAccessModeList" : "entitlement,org_environment",
  "lastRefreshed" : "2019-10-15T09:49:40+0000",
  "href" : "/owners/snowwhite"
}


[root@kvm-01-guest05 product]# subscription-manager register --org snowwhite --username admin --password admin --force --auto-attach
Unregistering from: shwetha-workstation.usersys.redhat.com:8443/candlepin
The system with UUID 22cc084b-4ba5-4b4c-8bce-938d973b531e has been unregistered
All local data removed
Registering to: shwetha-workstation.usersys.redhat.com:8443/candlepin
The system has been registered with ID: 314b3967-d2d5-40c3-b2bb-5a0890390057
The registered system name is: kvm-01-guest05.lab.eng.rdu2.redhat.com
Ignoring request to auto-attach. It is disabled for org "snowwhite".
Installed Product Current Status:
Product Name: Awesome OS Server Bits
Status:       Not Subscribed
^^ since auto-attach is disabled and user has access to content , this info "Status:       Not Subscribed" is creating confusion

[root@kvm-03-guest01 ~]# curl -k --request POST --user admin:admin --data '{"name":"GoldenTicketAutoFalse","autoAttach":"false"}' --header 'accept: application/json' --header 'content-type: application/json' https://shwetha-workstation.uersys.redhat.com:8443/candlepin/owners/snowwhite/activation_keys | python -mjson.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   617    0   564  100    53    438     41  0:00:01  0:00:01 --:--:--   437
{
    "addOns": [],
    "autoAttach": false,
    "contentOverrides": [],
    "created": "2019-10-18T09:03:10+0000",
    "description": null,
    "id": "8ac6a3a96dced151016dde1b400b0d4c",
    "name": "GoldenTicketAutoFalse",
    "owner": {
        "displayName": "Snow White",
        "href": "/owners/snowwhite",
        "id": "8ac6a3a96dced151016dced17ec10003",
        "key": "snowwhite"
    },
    "pools": [],
    "products": [],
    "releaseVer": {
        "releaseVer": null
    },
    "role": null,
    "serviceLevel": null,
    "updated": "2019-10-18T09:03:10+0000",
    "usage": null
}


[root@kvm-03-guest01 ~]# subscription-manager register --activationkey GoldenTicketAutoFalse --org snowwhite --force
Unregistering from: shwetha-workstation.usersys.redhat.com:8443/candlepin
The system with UUID e03256f6-bb22-4a65-afca-72923624ab76 has been unregistered
All local data removed
The system has been registered with ID: c34ebf3e-ba26-41bc-8c21-e95589d7cd8d
The registered system name is: kvm-03-guest01.hv2.lab.eng.bos.redhat.com
Installed Product Current Status:
Product Name: Awesome OS Instance Server Bits
Status:       Not Subscribed



Actual results:


Expected results:
either remove the status or do not display installed product list completely when registering to org with contentAccessMode=org_environment

Additional info:

Comment 8 Shwetha Kallesh 2020-04-16 12:29:57 UTC
[root@hpe-dl380pgen8-02-vm-15 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.1.9-1
subscription management rules: 5.39
subscription-manager: 1.24.32


[root@hpe-dl380pgen8-02-vm-15 ~]# curl --stderr /dev/null --insecure --user admin:admin --request PUT --data '{"contentAccessMode":"org_environment"}' --header 'accept: application/json' --header 'content-type: application/json' https://10.70.35.0:8443/candlepin/owners/snowwhite
{
  "created" : "2020-04-16T10:29:37+0000",
  "updated" : "2020-04-16T11:50:48+0000",
  "id" : "8ac6a38071828911017182896e8d0002",
  "key" : "snowwhite",
  "displayName" : "Snow White",
  "parentOwner" : null,
  "contentPrefix" : null,
  "defaultServiceLevel" : null,
  "upstreamConsumer" : null,
  "logLevel" : null,
  "autobindDisabled" : false,
  "autobindHypervisorDisabled" : false,
  "contentAccessMode" : "org_environment",
  "contentAccessModeList" : "entitlement,org_environment",
  "lastRefreshed" : "2020-04-16T10:34:17+0000",
  "href" : "/owners/snowwhite"
}


[root@hpe-dl380pgen8-02-vm-15 ~]# subscription-manager register --org snowwhite --username admin --password admin --force --auto-attach --serverurl ansible-candlepin.usersys.redhat.com:8443/candlepin
Registering to: ansible-candlepin.usersys.redhat.com:8443/candlepin
The system has been registered with ID: 28a134b6-d46e-4217-8bfd-02498e31f386
The registered system name is: hpe-dl380pgen8-02-vm-15.hpe2.lab.eng.bos.redhat.com
Ignoring request to auto-attach. It is disabled for org "snowwhite" because of the content access mode setting.
^^ observe that installed product list is not getting displayed

Activation key with auto-attach=false

[root@hpe-dl380pgen8-02-vm-15 ~]# curl -k --request POST --user admin:admin --data '{"name":"GoldenTicketAutoFalse","autoAttach":"false"}' --header 'accept: application/json' --header 'content-type: application/json' https://ansible-candlepin.usersys.redhat.com:8443/candlepin/owners/snowwhite/activation_keys | python -mjson.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   617    0   564  100    53    147     13  0:00:04  0:00:03  0:00:01   147
{
    "addOns": [],
    "autoAttach": false,
    "contentOverrides": [],
    "created": "2020-04-16T12:19:23+0000",
    "description": null,
    "id": "8ac6a38071828911017182ededbb0d71",
    "name": "GoldenTicketAutoFalse",
    "owner": {
        "displayName": "Snow White",
        "href": "/owners/snowwhite",
        "id": "8ac6a38071828911017182896e8d0002",
        "key": "snowwhite"
    },
    "pools": [],
    "products": [],
    "releaseVer": {
        "releaseVer": null
    },
    "role": null,
    "serviceLevel": null,
    "updated": "2020-04-16T12:19:23+0000",
    "usage": null
}
[root@hpe-dl380pgen8-02-vm-15 ~]# subscription-manager register --activationkey GoldenTicketAutoFalse --org snowwhite --force
Unregistering from: ansible-candlepin.usersys.redhat.com:8443/candlepin
The system with UUID 28a134b6-d46e-4217-8bfd-02498e31f386 has been unregistered
All local data removed
The system has been registered with ID: d4761b1c-39f6-4dcc-bd8d-3b8b34f47fa7
The registered system name is: hpe-dl380pgen8-02-vm-15.hpe2.lab.eng.bos.redhat.com
^^ no installed products are listed

Activationkey with auto-attach=true

[root@hpe-dl380pgen8-02-vm-15 ~]# curl -k --request POST --user admin:admin --data '{"name":"GoldenTicketAutoTrue","autoAttach":"true"}' --header 'accept: application/json' --header 'content-type: application/json' https://ansible-candlepin.usersys.redhat.com:8443/candlepin/owners/snowwhite/activation_keys | python -mjson.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   613    0   562  100    51    248     22  0:00:02  0:00:02 --:--:--   248
{
    "addOns": [],
    "autoAttach": true,
    "contentOverrides": [],
    "created": "2020-04-16T12:21:23+0000",
    "description": null,
    "id": "8ac6a38071828911017182efc3630d85",
    "name": "GoldenTicketAutoTrue",
    "owner": {
        "displayName": "Snow White",
        "href": "/owners/snowwhite",
        "id": "8ac6a38071828911017182896e8d0002",
        "key": "snowwhite"
    },
    "pools": [],
    "products": [],
    "releaseVer": {
        "releaseVer": null
    },
    "role": null,
    "serviceLevel": null,
    "updated": "2020-04-16T12:21:23+0000",
    "usage": null
}
[root@hpe-dl380pgen8-02-vm-15 ~]# subscription-manager register --activationkey GoldenTicketAutoTrue --org snowwhite --force
Unregistering from: ansible-candlepin.usersys.redhat.com:8443/candlepin
The system with UUID d4761b1c-39f6-4dcc-bd8d-3b8b34f47fa7 has been unregistered
All local data removed
The system has been registered with ID: 838e4244-12eb-4bdd-ade3-2a4b2f97f642
The registered system name is: hpe-dl380pgen8-02-vm-15.hpe2.lab.eng.bos.redhat.com
^^ no installed product list , however there is no "Ignoring request to auto-attach. It is disabled for org "snowwhite" because of the content access mode setting." message , but a bug(https://bugzilla.redhat.com/show_bug.cgi?id=1805111) for that has already been logged, so moving this bug to verified

[root@hpe-dl380pgen8-02-vm-15 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Disabled
Content Access Mode is set to Organization/Environment Access. This host has access to content, regardless of subscription status.

System Purpose Status: Disabled

Comment 10 errata-xmlrpc 2020-09-29 19:22:47 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 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:3866


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