Detecting errors in upstart jobs

Scott James Remnant scott at netsplit.com
Wed Aug 4 15:46:34 BST 2010


On Fri, 2010-07-30 at 18:39 +0900, David wrote:

> I have not found a user mailing list, I hope this is the right place.
> 
> In one of Ubuntu's  jobstart definition (mongodb), there is an issue 
> when the binary cannot be launched. More precisely, the script section 
> as follows:
> 
> script
>      ...
>      exec start-stop-daemon --start --quiet --chuid mongodb \
>          --exec  /usr/bin/mongod -- --config /etc/mongodb.conf;
>    fi
> end script
> 
> Does not signal any error even though mongod cannot be launched (the 
> exact issue here is one of the shared library of the mongodb executable 
> is missing). Worse, the status error of `service start mongodb` is 0.
> 
> How can I fix this ?
> 
The problem with this script is that it's using start-stop-daemon which
hides the exit code - assumedly to avoid using "su" to change the user.

So not an Upstart problem per se, except for the missing "chuid" support

Scott
-- 
Have you ever, ever felt like this?
Had strange things happen?  Are you going round the twist?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/upstart-devel/attachments/20100804/917a29ff/attachment.pgp 


More information about the upstart-devel mailing list