Bug 1038242
Summary: | Blindly assumes presence of /mnt/sysimage means it should put things there | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Bill Nottingham <notting> |
Component: | subscription-manager | Assignee: | Adrian Likins <alikins> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | John Sefler <jsefler> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.0 | CC: | alikins, bkearney, ckozak, rvokal |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-06-13 12:42:47 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: | |||
Bug Depends On: | |||
Bug Blocks: | 863175 |
Description
Bill Nottingham
2013-12-04 17:01:16 UTC
Definately busted for the case mentioned. Is there a good way to determine if a yum plugin is running within anaconda? Discussed this with the anaconda folks, and the thought was that looking for /mnt/sysimage was reasonable, and it's existing elsewhere was a bug. But that looking for say, /tmp/anaconda.log as well would mitigate. Since /tmp/anaconda.log is probably even more likely to accidentally exist (or be created by a install into an image), changed to checking for '/mnt/sysimage' and '/var/run/anaconda.pid' pr at https://github.com/candlepin/subscription-manager/pull/910 master commit 86138d955d2d3859d0f1c6c94a91c02d00f34f9d Author: Adrian Likins <alikins> Date: Tue Feb 18 11:59:12 2014 -0500 1038242: add anaconda.pid check before chroot The yum plugin 'productid.py' has to detect if it is running in anaconda or not, so that it will place the productid file in the correct chroot. Previusly, this just checked for existince of '/mnt/sysimage' but that can exist outside of anaconda (or in the original bug, left over by anaconda). So add a check that '/var/run/anaconda.pid' exists as well. Demonstrating the failure.... [root@jsefler-6server ~]# subscription-manager version server type: Red Hat Subscription Management subscription management server: Unknown subscription-manager: 1.9.11-1.el6 python-rhsm: 1.9.6-1.el6 [root@jsefler-6server ~]# subscription-manager register --username=stage_test_12 --serverurl=subscription.rhn.stage.redhat.com:443/subscription --autosubscribe Password: The system has been registered with ID: c6d2789e-8ba7-4734-b4ce-a101f97aec1d Installed Product Current Status: Product Name: Red Hat Enterprise Linux Server Status: Subscribed [root@jsefler-6server ~]# find /mnt/sysimage find: `/mnt/sysimage': No such file or directory [root@jsefler-6server ~]# mkdir -p /mnt/sysimage [root@jsefler-6server ~]# yum install zsh --quiet -y This system is receiving updates from Red Hat Subscription Management. This system is not registered with RHN Classic or RHN Satellite. You can use rhn_register to register. RHN Satellite or RHN Classic support will be disabled. [root@jsefler-6server ~]# find /mnt/sysimage/ /mnt/sysimage/ /mnt/sysimage/var /mnt/sysimage/var/lib /mnt/sysimage/var/lib/rhsm /mnt/sysimage/var/lib/rhsm/productid.js /mnt/sysimage/etc /mnt/sysimage/etc/pki /mnt/sysimage/etc/pki/product /mnt/sysimage/etc/pki/product/69.pem FAILED: The product-id yum plugin installed the repo product cert 69.pem into /mnt/sysimage/etc/pki/product and also installed productid.js file. This chroot should not have happened. Verifying Version.... [root@jsefler-7 ~]# subscription-manager version server type: This system is currently not registered. subscription management server: Unknown subscription-manager: 1.10.14-3.el7 python-rhsm: 1.10.12-1.el7 [root@jsefler-7 ~]# subscription-manager register --username=rhel7beta --serverurl=subscription.rhn.stage.redhat.com:443/subscription --autosubscribe Password: The system has been registered with ID: eab93723-8a6f-4d9a-bd15-0a2abdae7a6d Installed Product Current Status: Product Name: Red Hat Enterprise Linux 7 Server High Touch Beta Status: Subscribed [root@jsefler-7 ~]# find /mnt/sysimage find: ‘/mnt/sysimage’: No such file or directory [root@jsefler-7 ~]# mkdir -p /mnt/sysimage [root@jsefler-7 ~]# ls /var/run/anaconda.pid ls: cannot access /var/run/anaconda.pid: No such file or directory [root@jsefler-7 ~]# rpm -q zsh package zsh is not installed [root@jsefler-7 ~]# yum install zsh --quiet -y [root@jsefler-7 ~]# rpm -q zsh zsh-5.0.2-7.el7.x86_64 [root@jsefler-7 ~]# find /mnt/sysimage /mnt/sysimage [root@jsefler-7 ~]# ls /var/lib/rhsm/ branded_name cache facts packages productid.js [root@jsefler-7 ~]# ls /etc/pki/product/ 230.pem VERIFIED: Despite the existance of /mnt/sysimage, no chroot was executed and /mnt/sysimage was not used by the yum product-id plugin during yum install of a package. /var/run/anaconda.pid isn't created by RHEL5 anaconda, hence https://bugzilla.redhat.com/show_bug.cgi?id=1104498 This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |