Bug 471387 - Client got timeout, waiting for regenerate of repomd cache
Client got timeout, waiting for regenerate of repomd cache
Status: CLOSED CURRENTRELEASE
Product: Spacewalk
Classification: Community
Component: Server (Show other bugs)
0.2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Pradeep Kilambi
Miroslav Suchý
:
Depends On:
Blocks: space05
  Show dependency treegraph
 
Reported: 2008-11-13 08:27 EST by Miroslav Suchý
Modified: 2009-09-17 03:08 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-17 03:08:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Miroslav Suchý 2008-11-13 08:27:42 EST
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):
511

How reproducible:
deterministic

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)
  
Actual results:
you will get timeout

Expected results:
you will not get timeout

Additional info:
We run following script just after every run of satellite-sync and this problem disappeared. I suggest to make it part of satellite-sync:

#!/usr/bin/python

import sys
sys.path.append('/usr/share/rhn/')

import os
os.umask(0002)

import server.repomd.repository as repository
import server.rhnChannel as rhnChannel

import common.rhnConfig as rhnConfig
import server.rhnSQL as rhnSQL

rhnConfig.initCFG()
rhnSQL.initDB()

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']))
    repo.get_repomd_file()
Comment 2 Stefan Kutzke 2009-03-05 16:17:06 EST
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?
Comment 3 Stefan Kutzke 2009-03-06 02:06:59 EST
I simply added the line

os.system('chown -R apache:apache /var/cache/rhn/repomd*')

to your script :-)
Comment 4 Jesus M. Rodriguez 2009-04-14 10:11:46 EDT
Spacewalk 0.5 released.
Comment 5 Miroslav Suchý 2009-09-17 03:08:36 EDT
Spacewalk 0.5 has been released for long time ago.

Note You need to log in before you can comment on or make changes to this bug.