Bug 471387 - Client got timeout, waiting for regenerate of repomd cache
Summary: Client got timeout, waiting for regenerate of repomd cache
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 0.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Pradeep Kilambi
QA Contact: Miroslav Suchý
URL:
Whiteboard:
Depends On:
Blocks: space05
TreeView+ depends on / blocked
 
Reported: 2008-11-13 13:27 UTC by Miroslav Suchý
Modified: 2009-09-17 07:08 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-17 07:08:36 UTC
Embargoed:


Attachments (Terms of Use)

Description Miroslav Suchý 2008-11-13 13:27:42 UTC
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 21:17:06 UTC
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 07:06:59 UTC
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 14:11:46 UTC
Spacewalk 0.5 released.

Comment 5 Miroslav Suchý 2009-09-17 07:08:36 UTC
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.