Red Hat Bugzilla – Bug 471387
Client got timeout, waiting for regenerate of repomd cache
Last modified: 2009-09-17 03:08:36 EDT
Description of problem:
If you have large channel and/or slow machine, you often get timeout when you request some package from newly synced channel.
I see this on several customers and it happend in our brno office satellite as well.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. take slow machine or big channel (rhel5 for example)
2. satellite-sync that channel
3. try to install some package from that channel (by invoking yum install on client)
you will get timeout
you will not get timeout
We run following script just after every run of satellite-sync and this problem disappeared. I suggest to make it part of satellite-sync:
import server.repomd.repository as repository
import server.rhnChannel as rhnChannel
import common.rhnConfig as rhnConfig
import server.rhnSQL as rhnSQL
channels = rhnChannel.list_channels('%-5') + rhnChannel.list_channels('%-appstk-2')
for channel in channels:
print "Channel: %s" % channel['name']
repo = repository.get_repository(rhnChannel.channel_info(channel['label']))
That's very interesting!
The script seems to work for me. I have done a test on my satellite 5.2 where I had the same timeout problems.
Even missing repmomd-files in /var/cache/rhn where generated successfully for channels which were synced previously but not used by any client yet.
I have no experience in Python - therefore my question:
The new generated repomd-files should be owned by user and group "apache" - and not by "root". How to a implement a "chown apache.apache" in your Python script for new files in /var/cache/rhn?
I simply added the line
os.system('chown -R apache:apache /var/cache/rhn/repomd*')
to your script :-)
Spacewalk 0.5 released.
Spacewalk 0.5 has been released for long time ago.