Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

If using the manual keyword in an init or override Upstart script, it is not clear whether the services shut down process will be initiated or it will just be killed on shut down.

For instance, will MySQLs default timeout be extended (giving it enough time to flush buffers, as specified in the init script) when the manual override is used? If not, would it be preferable to use a start on never setting, or do manually started services need to also be manually shut down?

The Upstart Cookbook has little to say on the matter.

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

I think you must have overlooked something as this is really clear in the link you provided:

5.2.1 Observations

There are some important points related to system shutdown:

[...]

  • Upstart never stops a job with no stop on condition.

[...]

5.2.2 Shutdown Process

[...]

One of the scripts run is /etc/init.d/sendsigs.

This script will kill any remaining processes not already stopped (including Upstart processes).

In this sendsigs script it's explained:

Upstart has a method to set a kill timeout and so the job author may want us to wait longer than 10 seconds (as in the case of mysql). (LP: #688541)

We will wait up to 300 seconds for any jobs in stop/killed state. Any kill timeout higher than that will be overridden by the need to shutdown. NOTE the re-use of seq from above, since we already waited up to 10 seconds for them.

share|improve this answer
add comment

Manual stanza refers to starting a job. See Upstart Technical Overview: Manual stanza. Therefore, a stop stanza defined in the overridden configuration file will be fully respected.

In the case of the MySQL server it is more important to define/override pre-start, post-start and kill timeout stanzas. For details examine default mysql.conf

cat /etc/init/mysql.conf

Blog entry Ubuntu Upstart for automatic MySQL start and stop has several ideas on how to improve default MySQL Upstart configuration file.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.