Creating RedHat Satellite Server repodata

I recently came across the following scenario with RedHat Satellite Server.

You either generate a custom channel but the repodata is’nt created, therefore you can’t “yum install” any packages from the channel that your system is subscribed to or you remove the repodata cache for a channel, and you can’t re-create it.

The repodata is stored in the following directory on the Satellite server.


There are 3 definitive methods, to re-create this missing data. The best method (1), that I’ve found is to use a library call via the API, which sends the task to taskomatic as a job.

Method 1
spacewalk-api is from the spacewalk-utils package.

 satellite# spacewalk-api --user=myadmin --password=redhat \ %session% rhn-tools-rhel-x86_64-server-6

$result = '1';

tail -f /var/log/rhn/rhn_taskomatic_daemon.log
satellite# ls -l /var/cache/rhn/repodata/rhn-tools-rhel-x86_64-server-6
total 24
-rw-r--r-- 1 root root 7886 Feb  6 16:59 filelists.xml.gz
-rw-r--r-- 1 root root 4154 Feb  6 16:59 other.xml.gz
-rw-r--r-- 1 root root 1213 Feb  6 16:59 primary.xml.gz
-rw-r--r-- 1 root root 1033 Feb  6 16:59 repomd.xml

Method 2
There is a Python script to create the repodata on 5.6, which also now works with PostgreSQL as well as Oracle.

Method 3
spacecmd is a powerful 3rd party tool which extensively uses the API.

spacecmd -u <user> -p <password> softwarechannel_regenerateyumcache rhn-tools-rhel-x86_64-server-6

There are also some tricks that you can try, although if any of the above 3 method’s fail, then these tricks are unlikely to work but i’ll include them for completeness.

* restarting the taskomatic service

* run the command “sat-sync”, which will auto-create the repodata only if there is a package update (security fix, bug squash, feature enhancement)

* run the schedule “channel-repodata-bunch”

This entry was posted in linux. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s