/srv/irclogs.ubuntu.com/2014/01/15/#upstart.txt

=== nikias_ is now known as nikias
MadkinderHi. Is there any way I can reliably tell that a service is started with upstart?10:14
Madkinderfrom what I see upstart reports that it managed to start the service regardless of success10:16
kaimastMadkinder: afaik the service tells upstart that is has started successfully10:22
kaimastthere are different ways to do this. see the "expect" flag in the cookbook10:22
Madkindertake a look: http://pastebin.com/ZNhwKTVs10:22
Madkinderthis starts like a charm10:22
kaimastmaybe because of the respawn flag?10:24
jodhMadkinder: 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:26
Madkinderjodh: that's the problem I'd like to fix10:27
jodhMadkinder: look at 'post-start' in init(5). I hope your service isn't as flaky as /bin/false though :)10:28
Madkinderjodh: you mean I should check whether my process started manually and emit a failure event or something like that, right?10:30
jodhMadkinder: 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:38
Madkinderunfortunately not all the services have a way to check the environment10:39
Madkinderfor example, nginx and apache to with their -t flag, but they are rather an exception then a rule :(10:40
MadkinderI'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:41
Madkindermost of the services with ancient sysvinit scripts work like a charm and report start failures, most upstart ones do not :(10:42
methodsanyone know what the proper `start on` target is for networking ?16:12
methodsI've tried just `networking` but doesn't seem to startup16:12
=== JanC_ is now known as JanC
=== broder_ is now known as broder
=== stgraber_ is now known as stgraber

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!