jamescarr | hey guys, another upstart question | 16:19 |
---|---|---|
jamescarr | is there a way to ensure something executes on startup when EVERYTHING ELSE has started? | 16:20 |
jamescarr | I have a service that needs to start when at least two other services have started | 16:20 |
jodh | jamescarr: "start on (started service-a and started service-b)". There is no "everything else" - jobs start and stop for the lifetime of the system boot. | 16:32 |
jamescarr | jodh: yeah I think what you said is what I need | 16:33 |
jamescarr | basically, I need this script to run once docker is running and networking has been configured ;) | 16:33 |
jamescarr | the problem was it was running before networking was configured or docker was running | 16:33 |
jamescarr | so sometimes it worked sometimes it didnt | 16:34 |
jodh | jamescarr: take a look at upstart-events(7) or http://upstart.ubuntu.com/cookbook/#ubuntu-well-known-events-ubuntu-specific as there are generally events for most stages of the boot. | 16:34 |
SpamapS | jamescarr: I'd do 'start on runlevel [2345]' and then in pre-start do 'exec start wait-for-state WAITER=myjob WAIT_FOR=docker' | 16:49 |
SpamapS | jodh: btw any movement on state awareness for upstart? | 16:50 |
jamescarr | SpamapS: didn't know about that pre-start thing | 16:51 |
jamescarr | thanks! | 16:51 |
SpamapS | jamescarr: it is less than obvious, but it solves the problem in a more robust way (it will force docker to start if it is not yet starting) | 16:52 |
jamescarr | yeah I like that | 16:52 |
jodh | SpamapS: not recently I'm afraid. Still something we're considering as mentioned in the LinuxCon talk. | 16:55 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!