[Spacewalk-list] Tool to check contents of /var/satelite against RHN Database

Alan Evans alanwevans at gmail.com
Mon Nov 15 22:45:51 UTC 2010


I posted to the list a few weeks ago about a tool to check /var/satellite
for packages that are not listed in the database and was told no such tool
existed.  So... I wrote one.

My concern was that my company's RHN Satellite has been through more than a
few upgrades, including some major upgrades like 4 -> 5 and has been through
the removal of bunches of custom and Red Hat base channels alike.  In my
experience any time a database contains a list of files on a filesystem the
two will inevitably get out of sync somehow.

Satellite-sync does a great job of making sure what's in the database has a
counterpart on the filesystem so this is not a problem.  However the reverse
seems not to have been considered.

Using my script I was able to indeed find that there were about 90 files in
/var/satellite that were no represented in the RHN database.  Ok so 90 files
out of 56,000 is not exactly something to get too overly worked up about but
before running my script I had no way to know.  My last RHN Satellite
upgrade involved moving Satellite to new hardware between datacenters so the
less I had to rsync the better.

In any event, I have attached my script in case it might be of use to anyone
else.  If it looks good perhaps it would make a good addition to the contrib
directory.

Regards,
-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20101115/fcdad04f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spacewalk-orphaned-files
Type: application/octet-stream
Size: 3246 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20101115/fcdad04f/attachment.obj>


More information about the Spacewalk-list mailing list