Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"yum clean all" does not remove urlgrabber's download host timing file #71

Closed
elyscape opened this issue May 25, 2018 · 1 comment
Closed

Comments

@elyscape
Copy link

elyscape commented May 25, 2018

This is a crosspost of RHBZ #1465172.

Description of problem

Yum, through the urlgrabber Python module, keeps track of which hosts are the quickest to download files from. This is generally useful, but can cause problems in some situations if it gets out of date (e.g. when cached in a Docker image). Unfortunately, while yum clean all cleans up most cached data, it does not remove the urlgrabber download host timing file.

Version-Release number of selected component (if applicable)

yum: 3.4.3-150.el7.centos
python-urlgrabber: 3.10-8.el7

How reproducible

Trivial.

Steps to Reproduce

As root (or with sudo in front of each command):

find /var/cache/yum -mindepth 1 -delete # clean up the cache
find /var/cache/yum -name timedhosts
yum -q makecache fast
find /var/cache/yum -name timedhosts
yum clean all
find /var/cache/yum -name timedhosts

Actual results

# find /var/cache/yum -mindepth 1 -delete # clean up the cache
# find /var/cache/yum -name timedhosts
# yum -q makecache fast
# find /var/cache/yum -name timedhosts
/var/cache/yum/x86_64/7/timedhosts
# yum clean all
Loaded plugins: fastestmirror, ovl
Cleaning repos: base extras updates
Cleaning up everything
Cleaning up list of fastest mirrors
# find /var/cache/yum -name timedhosts
/var/cache/yum/x86_64/7/timedhosts
# 

Expected results

# find /var/cache/yum -name timedhosts
# 

Additional info

This is not caused by the fastestmirror plugin, which by default uses a file named timedhosts.txt. It is caused by the timedhosts functionality of urlgrabber. This feature is disabled by default but was enabled in the Yum core in 9fdc18d, which has the following commit message:

enable timedhosts

Q: Make it configurable?

This was never followed up on. While it would be nice if it were possible to configure the use of timedhosts or the path to the file it uses, the primary issue is the fact that the timedhosts file is not removed during cleanup. It probably makes the most sense to handle this in the yum clean metadata command, which is implemented in cleanMetadata.

@dmnks
Copy link
Contributor

dmnks commented Feb 12, 2020

Thank you for the report. However, please note that this project has been deprecated and is no longer maintained upstream. Please consider migrating to DNF which is the successor of YUM. That said, I’ll close this issue now.

@dmnks dmnks closed this as completed Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants