Yet Another CentOS Quirk
Updating all CentOS servers at work to 7.4 went smooth. Except for one glitch.
For some reason we have yum-cron installed. I think the original purpose was to provide some kind of notification mechanism that updates are available.
Some months back I quieted part of yum-cron by commenting out the
exec line in
/etc/cron.hourly/0yum-hourly.cron. I saw no need for freaking hourly update checks. Daily is more than sufficient. I commented out the text rather than delete the cron job because I suspected that future package updates would restore the file. I presumed future updates would not try to overwrite an existing config file. That's why files like
The 7.4 updates included an update to yum-cron. Rather than creating
/etc/cron.hourly/0yum-hourly.cron.rpmnew, the package maintainer instead decided to just overwrite the file. I did not notice.
The next day there were emails in my in box. Curious, I looked around and discovered the overwrite.
I updated the servers to 7.4 in a slow rollout manner. After discovering the quirk, I set the immutable bit on the file:
chattr +i /etc/cron.hourly/0yum-hourly.cron
That prevented the file from being overwritten but left the system with a remnant
/etc/cron.hourly/0yum-hourly.cron;59c45c04 file. Cron complained.
On my to-do list is to remove the yum-cron package and use a simpler
yum check-update script wrapper to receive email notices.