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.
spacewalk-api is from the spacewalk-utils package.
satellite# spacewalk-api --server=satellite.mydomain.com --user=myadmin --password=redhat \ channel.software.regenerateYumCache %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
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”