=== nikias_ is now known as nikias | ||
Madkinder | Hi. Is there any way I can reliably tell that a service is started with upstart? | 10:14 |
---|---|---|
Madkinder | from what I see upstart reports that it managed to start the service regardless of success | 10:16 |
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:22 |
kaimast | maybe because of the respawn flag? | 10:24 |
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:26 |
Madkinder | jodh: that's the problem I'd like to fix | 10:27 |
jodh | Madkinder: look at 'post-start' in init(5). I hope your service isn't as flaky as /bin/false though :) | 10:28 |
Madkinder | jodh: you mean I should check whether my process started manually and emit a failure event or something like that, right? | 10:30 |
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:38 |
Madkinder | unfortunately not all the services have a way to check the environment | 10:39 |
Madkinder | for example, nginx and apache to with their -t flag, but they are rather an exception then a rule :( | 10:40 |
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:41 |
Madkinder | most of the services with ancient sysvinit scripts work like a charm and report start failures, most upstart ones do not :( | 10:42 |
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 | 16: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!