Pages

Wednesday, February 19, 2014

Red Hat Satellite - Regenerating repository data

I've been running into a problem where the web interface says there are updated packages available for a system, but yet when I sign on to the system and do a yum update, it reports no updates available.  If I try to deploy the updates from the web interface, the process fails with

Error while executing packages action: empty transaction [[6]]

After digging around, someone suggested rebuilding the repodata for the channel in question might fix it. I tried it out and it worked for me.

To do this process, a python script is needed. It can be obtained from here:
https://github.com/FDewaleyne/regen-repodata/blob/master/regen-repodata.py

Download the script to the satellite server. On the satellite server, delete the repodata that is there already and then run the script to regenerate it.

  1. Repodata is kept in  /var/cache/rhn/repodata by default
    • Doing an "ls" here will show directories for each channel that is sync'd to the satellite. Change directory to the channel to be regenerated.
  2. Delete all files within the directory.
  3. Run the python script
    • python /path/to/regen-repodata.py -c channelname --cleandb --force --db --url https://satellite.domain.local/rpc/api
    • The username and password it asks for is the admin account for the Satellite web interface.
  4. Depending on how large the channel is, this process could take a while.


No comments: