[10:14] <Madkinder> Hi. Is there any way I can reliably tell that a service is started with upstart?
[10:16] <Madkinder> from what I see upstart reports that it managed to start the service regardless of success
[10:22] <kaimast> Madkinder: afaik the service tells upstart that is has started successfully
[10:22] <kaimast> there are different ways to do this. see the "expect" flag in the cookbook
[10:22] <Madkinder> take a look: http://pastebin.com/ZNhwKTVs
[10:22] <Madkinder> this starts like a charm
[10:24] <kaimast> maybe because of the respawn flag?
[10:26] <jodh> Madkinder: Upstart will report that it successfully started the job when you "start" it, but "status <job>" will show you it is not (no longer) running.
[10:27] <Madkinder> jodh: that's the problem I'd like to fix
[10:28] <jodh> Madkinder: look at 'post-start' in init(5). I hope your service isn't as flaky as /bin/false though :)
[10:30] <Madkinder> jodh: you mean I should check whether my process started manually and emit a failure event or something like that, right?
[10:38] <jodh> Madkinder: no, I mean that if your job is really likely to fail at startup, you should use pre-start or post-start to handle that scenario. Generally, pre-start would setup the required environment. If you make the pre-start fail, the job will fail to start and "start <job>" will indicate that clearly.
[10:39] <Madkinder> unfortunately not all the services have a way to check the environment
[10:40] <Madkinder> for example, nginx and apache to with their -t flag, but they are rather an exception then a rule :(
[10:41] <Madkinder> I'm trying to configure my servers with configuration management tools (salt/ansible). The problem is that they both report that a service is started and running successfully while it might not be true.
[10:42] <Madkinder> most of the services with ancient sysvinit scripts work like a charm and report start failures, most upstart ones do not :(
[16:12] <methods> anyone know what the proper `start on` target is for networking ?
[16:12] <methods> I've tried just `networking` but doesn't seem to startup