Bug 1245473
| Summary: | Change the message when yum update fails within the container on a system with no subscriptions | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Shwetha Kallesh <skallesh> |
| Component: | subscription-manager | Assignee: | Kevin Howell <khowell> |
| Status: | CLOSED ERRATA | QA Contact: | John Sefler <jsefler> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.2 | CC: | bcourt, csnyder, khowell, skallesh, vrjain |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-08-01 19:18:42 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
deferring to rhel-7.3.0 due to schedule and severity 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? 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 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. Moving to MODIFIED as the fix has passed review and will be included in the first build for RHEL 7.4 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.
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. 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 Shwetha, can you please retest after yum updating subscription-manager inside the image? [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
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 |
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: