Are upstart jobs guaranteed to be given time to run?

1

I am writing an upstart job that runs a shell script at startup and shutdown which synchronizes some files with a remote machine using rsync. The script can sometimes take a long time to complete if a lot of files have changed. As far as I can tell, the shutdown process includes a part where it kills all jobs that are taking too long to terminate. Is there any chance that this could kill the script (which is run in the pre-stop part of the process, or is the script guaranteed to be allowed to run until it terminates before the computer continues with shutdown?

Gavin S. Yancey

Posted 2014-03-29T03:50:45.847

Reputation: 198

Answers

1

According to the cookbook, pre-stop is indeed the place to do this.

Brian.D.Myers

Posted 2014-03-29T03:50:45.847

Reputation: 321