Spacewalk 2.4 rebooting clients

This is mainly for my benefit. I recently migrated to spacewalk for patch management. It's not the greatest tool in the world, but it does the job well. One gripe I have had is that when you schedule a reboot via spacewalk, the clients do not check in after a reboot. That statement is not technically true. rhn_check will run at some point, but not in the time frame you would expect. I found this archived thread that provides a good solution:

https://www.redhat.com/archives/spacewalk-list/2016-September/msg00053.html

The reason spacewalk clients don't check in after a reboot is that you could overwhelm the server if you rebooted a lot of hosts at the same time. I do not have this issue. I am not in a large enviroment (1000+ server), but I am not in a small environment (maybe 20 servers).

I added this to /etc/crontab on all my linux hosts

@reboot root perl -le 'sleep rand 90' && /usr/sbin/rhn_check >& /dev/null

This sets the server to check in at a random time between 90 second after a reboot. That is plenty of time for me with the number of hosts that I have.

Comments