I have a situation where a RHEL 6.4 server is sending
KILL signals too quickly, before applications and databases have had a chance to gracefully stop. It seems that Upstart is handing control to the sysv-rc scripts prematurely.
To troubleshoot this, I've tried adding
logger commands into the Upstart config. The
pre-script stanza is writing to syslog, but the sleep never completes because the system reboots within 10 seconds. I've also added a
kill timeout which is ignored.
# cleanup at system shutdown # Does stop all on apps, stops monit instances, then does a clean. start on runlevel  console output kill timeout 120 task pre-start script logger -s -t "arcsight-services-stopall" "Running pre-start..." /etc/init.d/arcsight_services stop sleep 60 end script script logger -s -t "arcsight-services-stopall" "Running script..." /etc/init.d/arcsight_services shutdown monit /etc/init.d/arcsight_services clean all end script
I know Upstart was suppose to parallelize the boot/halt process, but it has only paralyzed my debugging attempts.
Under RHEL 6, what is the definitive order of scripts that get executed after issuing:
shutdown -r now?
shutdown -r now
Where do the other /etc/init/*.conf scripts get called?
UPDATE: In dissecting
/etc/rc.d/rc, I found that if I
touch /var/run/confirm, the process enters an interactive mode and then my sleep & logger commands seem to execute. This baffles me, because I thought, at that point, Upstart has passed control to sysv-rc.