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 1245473 - Change the message when yum update fails within the container on a system with no subscriptions
Summary: Change the message when yum update fails within the container on a system wi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.2
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: rc
: ---
Assignee: Kevin Howell
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-22 07:18 UTC by Shwetha Kallesh
Modified: 2023-10-06 17:29 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 19:18:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 1503 0 None closed 1245473: Add container-specific no-certs warning 2020-09-14 16:32:41 UTC
Red Hat Product Errata RHBA-2017:2083 0 normal SHIPPED_LIVE python-rhsm and subscription-manager bug fix and enhancement update 2017-08-01 18:14:19 UTC

Description Shwetha Kallesh 2015-07-22 07:18:56 UTC
Description of problem:
If the system is registered and doesn't have any subscriptions attached,yum update within the docker container fails with Message "This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register."

Version-Release number of selected component (if applicable):
[root@dhcp35-3 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.26.11-1
subscription management rules: 5.12
subscription-manager: 1.15.6-1.el7
python-rhsm: 1.15.3-1.el7


How reproducible:


Steps to Reproduce:
    [root@dhcp35-236 ~]# docker run -i -t rhel7 yum -y update
    Usage of loopback devices is strongly discouraged for production use. Either use `--storage-opt dm.thinpooldev` or use `--storage-opt dm.no_warn_on_loop_devices=true` to suppress this warning.
                            Loaded plugins: product-id, subscription-manager
    This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
    There are no enabled repos.
     Run "yum repolist all" to see the repos you have.
     You can enable repos with yum-config-manager --enable <repo>
     
     
    [root@dhcp35-236 ~]# yum update -y
    Plugin "search-disabled-repos" requires API 2.7. Supported API is 2.6.
    Loaded plugins: langpacks, product-id, subscription-manager
    This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions.
    There are no enabled repos.
     Run "yum repolist all" to see the repos you have.
     You can enable repos with yum-config-manager --enable <repo>


Actual results:


Expected results:


Additional info:

Comment 2 John Sefler 2015-09-25 16:11:11 UTC
deferring to rhel-7.3.0 due to schedule and severity

Comment 4 Barnaby Court 2015-11-30 19:31:59 UTC
What message do you expect to be given when attempting to use yum in a container when the host does not have any subscriptions attached?

Comment 5 Shwetha Kallesh 2016-01-19 12:56:56 UTC
I would prefer the message 

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

as system is in registered state but there are no subscriptions attached

Comment 6 Kevin Howell 2016-09-20 18:49:04 UTC
Looked into this a bit. We don't provide the identity cert to the container, so it is not easy to distinguish between the host being unregistered and the host being registered but not subscribed. I think this was an intentional design decision, so I'm not sure that this is an easy fix. The only rational change I can think of is to special case containers, and use language that indicates either is a possibility, but this makes the container use case less consistent with the non-container use case, so I'm hesitant to go down that path. Another alternative would be to have the docker integration change so we have some way of verifying whether the host is registered or not, and I'm also not sure that's a good path to go down either... I'll needinfo for a better idea for solution, and ask around.

Comment 7 Chris Snyder 2016-10-07 19:19:22 UTC
Moving to MODIFIED as the fix has passed review and will be included in the first build for RHEL 7.4

Comment 9 Shwetha Kallesh 2017-04-12 15:41:48 UTC
Dont see any change in the string ,

[root@bkr-hv03-guest33 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.51.21-1
subscription management rules: 5.15.1
subscription-manager: 1.19.7-1.el7
python-rhsm: 1.19.4-1.el7


[root@bkr-hv03-guest33 ~]# docker run -i -t rhel7 yum -y update
Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
There are no enabled repos.
 Run "yum repolist all" to see the repos you have.
 To enable Red Hat Subscription Management repositories:
     subscription-manager repos --enable <repo>
 To enable custom repositories:
     yum-config-manager --enable <repo>

[root@bkr-hv03-guest33 ~]# docker run -i -t rhel7

[root@805cc4ac940e /]# yum update -y
Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
There are no enabled repos.
 Run "yum repolist all" to see the repos you have.
 To enable Red Hat Subscription Management repositories:
     subscription-manager repos --enable <repo>
 To enable custom repositories:
     yum-config-manager --enable <repo>

[root@805cc4ac940e /]# subscription-manager version
subscription-manager is disabled when running inside a container. Please refer to your host system for subscription management.

Comment 10 Kevin Howell 2017-04-12 19:22:33 UTC
Shwetha, can you please let me know what version of subscription-manager is running on the container? I suspect that the image doesn't have an updated version of subscription-manager. `rpm -qa subscription-manager` will work.

Comment 11 Shwetha Kallesh 2017-04-13 09:31:45 UTC
Looks image doesnt have the latest version of sub-man

[root@d4f9aa6235df /]# rpm -qa | grep subscription-manager
subscription-manager-1.17.15-1.el7.x86_64

Comment 12 Kevin Howell 2017-04-20 16:20:28 UTC
Shwetha, can you please retest after yum updating subscription-manager inside the image?

Comment 13 Shwetha Kallesh 2017-06-05 10:00:25 UTC
[root@93e2cc6e2a05 /]# yum update -y
Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager
This system is not receiving updates. You can use subscription-manager on the host to register and assign subscriptions.
There are no enabled repos.
 Run "yum repolist all" to see the repos you have.
 To enable Red Hat Subscription Management repositories:
     subscription-manager repos --enable <repo>
 To enable custom repositories:
     yum-config-manager --enable <repo>


[root@93e2cc6e2a05 /]# rpm -qa | grep subscription-manager
subscription-manager-1.19.12-1.el7.x86_64

Comment 14 errata-xmlrpc 2017-08-01 19:18:42 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, 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-2017:2083


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