Centos and Centos-update mirrorlist.txt files disappearing


(Charlie Lehardy) #1

The mirrorlist.txt files for Centos and Centos-update keep getting deleted on my two NS gateways, which are configured identically. These are the files that allow the software center and yum updates to find the resource repositories on the web. They normally live at /var/cache/yum/x86_64/6/centos-base/ and …/centos-update/ Approximately every 24 hours, some process deletes these files, which then breaks yum and the software center.

(By the way, there are 2 mirrorlist files associated with nethserver-base and nethserver-update, and these are never affected. I believe the software center dies when the Centos files are missing because the center looks for Centos updates first, and failing to find the Centos mirror lists, it doesn’t try to go any further.)

In trying to figure out why my software center was dying, I finally discovered that these files were missing. I created my own copies and uploaded them by FTP, which restored the functionality of the software center and yum update. However, overnight the files I had uploaded were deleted again.

I am using NS as a gateway and I am using all 4 networks: green, blue, orange and red. I have the following modules installed and running: firewall, traffic shaping, web proxy, web filtering, ips, backup, bandwidth monitor, dhcp, dns, and vpn. Traffic shaping is presently disabled. Web filters are updating nightly. Anti-virus is disabled.

I’ve searched the log files to see if I could find a record of the files being removed. The only thing I found is a reference I can’t make sense of, but I’ll paste it in here in case it’s relevant.

type=AVC msg=audit(1431378383.144:1924): avc: denied { remove_name } for pid=6976 comm=“pkginfo” name=“mirrorlist.txt” dev=dm-1 ino=28443882 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:rpm_var_cache_t:s0 tclass=dir

type=AVC msg=audit(1431378383.144:1924): avc: denied { unlink } for pid=6976 comm=“pkginfo” name=“mirrorlist.txt” dev=dm-1 ino=28443882 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:rpm_var_cache_t:s0 tclass=file

I’ll be happy to run tests if anyone has any ideas. Thanks.


(Filippo Carletti) #2

I’m no yum expert, but from the path I think I can say that those file are a cache, temporary files that will appear and disappear when yum is used.
As a test, I deleted them in my machine and issued a yum update: they re-appeared and yum worked flawlessly.
Unfortunately I can’t tell what’s wrong on your system. Let’s hope someone who knows better could help.


(Charlie Lehardy) #3

I’m less of a yum expert, and while I agree that this path points to a cache, this is the path that yum reports in its error message when yum update fails. That could mean the sources for the mirrorlist.txt files are elsewhere and are supposed to be copied to the cache where yum uses them, but that process isn’t working? Not sure.


(Davide Principi) #4

Very puzzling! Two questions arose in my mind:

  • Is there any cron task regarding YUM?
  • Are the machines running from a VPS provider?

We hit a similar problem in the past with OVH hosting.


(Charlie Lehardy) #5

Some interesting things in that OVH conversation. Thanks for the link. However, no, these are 2 physical servers running at my location, and each was built using the Nethserver 6.6 iso. I would imagine YUM must have a cron job running, since it regularly checks for updates and posts the results on the update panel. Since the files seem to disappear every 24 hours, looking at the running cron jobs is probably my next step. Thank you Davide.


(Charlie Lehardy) #6

The problem is linked to the automatic backup process. When automatic backup is disabled, the mirrorlist.txt files remain where they are and the software center works. Following an automatic backup, the files disappear and the software center stops working. I’m studying the backup scripts to see if I can find what causes the problem. Perhaps a file cleanup process gets called before the backup is performed?


(Filippo Carletti) #7

All my servers have the backup running every night and I never had problems with mirrorlist.

But I think you may be on the right track: the first step of the backup is a pre-backup action which dumps the mysql database, fs acl and other things accoridng to installed software (sogo is one of them).
Have a look at /etc/e-smith/events/pre-backup-data/.


(Charlie Lehardy) #8

Don’t see anything in the e-smith/events files or in the logs that explains it, and now I don’t seem to be able to reproduce the problem. I’ll do some more testing.


(Charlie Lehardy) #9

FYI, this problem has been resolved for me with one of the recent NS updates. mirrorlist.txt files are no longer disappearing.