Bug 700035
Summary: | after removing /var/cache/yum/* yum misbehaves | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Jan Hutař <jhutar> |
Component: | yum | Assignee: | James Antill <james.antill> |
Status: | CLOSED ERRATA | QA Contact: | Red Hat Satellite QA List <satqe-list> |
Severity: | urgent | Docs Contact: | |
Priority: | urgent | ||
Version: | 6.1 | CC: | borgan, cperry, jwest, mglantz, msuchy, pep, pknirsch, tcapek |
Target Milestone: | rc | Keywords: | Regression |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | yum-3.2.29-17.el6 | Doc Type: | Bug Fix |
Doc Text: |
After manually clearing the yum cache by removing all files under the /var/cache/yum/ directory, running the "yum update" or "yum clean all" commands could have resulted in failure with the following error message: "There are no enabled repos." With this update, yum proceeds as expected with downloading repodata even after manually clearing the cache.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2011-05-19 13:34:28 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jan Hutař
2011-04-27 10:28:13 UTC
I can not reproduce it. I do confirm this bug. It will happen if, and only if, you do not have any additional repositories. I.e. you only have rhnplugin and nothing else. Nope. yum clean all is not enough. yum-rhn-plugin do not remove rhnplugin.repos You have to do one of these: * rm -rf /var/cache/yum/* * find /var/cache/yum/ -name rhnplugin.repos |xargs rm -f * have cleanly kickstarted system where is no information in /var/cache/yum These 2 first are good for reproducing. Customers will hit the last one. I will do tomorrow such kickstart and will confirm this behaviour. I expect that I will be unable to install single packages till I run yum repolist This bug happen with yum-3.2.29 from RHEL6.1 (rebased in RHEL6.1 in January 2011). It does not happen with yum-3.2.27 from RHEL6.0. I do confirm, that when you kickstart rhel6 machine with at least yum,rhn-client-tools and yum-rhn-plugin from rhel6.1 (I put it in custom channel of RHEL6.0), then: - machine successfully kickstart (because yum use the /ty/ url and do not use rhnplugin) - after kickstart if you run yum update (or clean/install/...) you get: 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> until you run yum repolist. There are several options: 1) revert our move from init_hook to prereposetup_hook 2) revert BZ 620802 in RHEL - this is the cause why yum write the error message and exit before continuing to prereposetup_hook. 3) create dummy repository during init_hook and remove it during prereposetup_hook. I tried it. And it works. But it misbehave (*) when you are subscribed to no chanell (neither base nor child). And right now I have no idea hot to fix it. (*) it writes: Error: Cannot retrieve repository metadata (repomd.xml) for repository: dummy-yum-rhn-pluggin. Please verify its path and try again I do confirm that with revert of BZ 620802 it start working correctly. After discussion with Cliff and JamesA. we come that revert of BZ 620802 is least intrusive. Switching to yum component. Literally a one line patch here, turning off the feature. Is about as safe as it can get... diff -ru yum-3.2.29-orig/yumcommands.py yum-3.2.29/yumcommands.py --- yum-3.2.29-orig/yumcommands.py 2011-04-28 09:40:25.737582856 -0400 +++ yum-3.2.29/yumcommands.py 2011-04-28 09:41:46.659607841 -0400 @@ -128,6 +128,11 @@ @param base: a YumBase object. """ + if True: return + if base.repos.listEnabled(): return Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: After manually clearing the yum cache by removing all files under the /var/cache/yum/ directory, running the "yum update" or "yum clean all" commands could have resulted in failure with the following error message: "There are no enabled repos." With this update, yum proceeds as expected with downloading repodata even after manually clearing the cache. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0602.html |