Bug 471387

Summary: Client got timeout, waiting for regenerate of repomd cache
Product: [Community] Spacewalk Reporter: Miroslav Suchý <msuchy>
Component: ServerAssignee: Pradeep Kilambi <pkilambi>
Status: CLOSED CURRENTRELEASE QA Contact: Miroslav Suchý <msuchy>
Severity: medium Docs Contact:
Priority: medium    
Version: 0.2CC: bperkins, jesusr, skutzke
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-17 07:08:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 456553    

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.