centos-package-cron icon indicating copy to clipboard operation
centos-package-cron copied to clipboard

errata_fetcher.py does not cache

Open stevemeier opened this issue 6 years ago • 4 comments

Hello,

when running centos-package-cron on a test machine I noticed that it does not cache the downloaded errata.latest.xml file. Every time centos-package-cron runs it initiates a new download.

This creates a lot of unnecessary load on my end as I am hosting the XML file and paying for it. As centos-package-cron is also run by cron (duh!), a bunch of requests come in at the exact same time, very much like a DoS.

Please implement some sort of caching (preferably similar to wget -N) in errata_fetcher.py. Thanks!

stevemeier avatar Jun 05 '18 09:06 stevemeier

@stevemeier - Fair point Steve. Victim of its own success! I just need to find time to do a PR for this. I haven't used this utility in a while and never realized other people would.

wied03 avatar Jun 05 '18 17:06 wied03

I sort of referenced etags on issue #14

wied03 avatar Jun 05 '18 17:06 wied03

@wied03 On an average day I see about 1500 downloads using Python-urllib as a client from almost 300 different source addresses. 95%+ of them are either on top of the hour or exactly half past which is why I attribute them to centos-package-cron.

stevemeier avatar Jun 05 '18 17:06 stevemeier

I haven't used this utility in a while and never realized other people would

@wied03 Well, until CentOS implements the --security plugin for yum, your program is actually the best alternative out there!

maulinglawns avatar Jun 05 '18 18:06 maulinglawns