[17:09] <frew> hey guys
[17:09] <frew> I'm using post-start to block until a service is ready
[17:10] <frew> I was under the impression that if a post-start script exits non-zero the service will then stop
[17:10] <frew> but I guess that's not documented to be the case, and maybe it just isn't
[17:10] <frew> thoughts?
[17:31] <chras> frew: dont you want that in pre-start?
[18:15] <frew> uh
[18:15] <frew> no I don't see how that would make sense
[18:16] <frew> I want to run the main script, and then block till it's ready
[18:17] <chras> maybe im confused whatyou're trying to do
[18:17] <frew> yeah sorry
[18:17] <frew> so like
[18:17] <frew> imagine you have a web server
[18:17] <frew> and it takes like, 10s before it actually listens on port 80
[18:18] <chras> becuase you have some sort of ruby , or whatnot that takes time to do the initial compile?
[18:18] <frew> you can add a post-start that wget's port 80 over and over till it gets an actual return
[18:18] <frew> right exactly
[18:18] <frew> the problem is
[18:18] <frew> I'd like the post-start script, if it takes to long, to give up and mark the whole thing as failed
[18:20] <chras> does something else trigger off of this event?
[18:30] <frew> well
[18:30] <frew> if you do start $foo
[18:30] <frew> it will block until post-start completes
[18:30] <frew> so naive scripts do indeed
[18:31] <chras> frew: i just tested, and an exit code of 1 in a post-stop doesnt kill the already-running process
[18:31] <chras> but
[18:31] <frew> yeah I know; I just want it to :)
[18:32] <chras> if you manually check
[18:32] <chras> and issue a 'stop' inside your post-start
[18:32] <chras> then it will shut it down
[18:33] <frew> I thought I tried that
[18:33] <frew> how do you do that?  I tried literally stop $svcname
[18:33] <chras> so in my test i did this
[18:33] <chras> post-start script echo "sysrqd: this is a post start the next line is a stop" | $ILOG stop
[18:33] <chras> oop, formatting is wrong
[18:33] <chras> ill pastebin it
[18:33] <chras> https://pastebin.mozilla.org/8869640
[18:34] <frew> ok just a single stop.
[18:34] <frew> huh
[18:34] <chras> yeah
[18:34] <frew> any idea if that will make start exit non-zero?
[18:34] <frew> not a huge deal but that would be nice
[18:34] <chras> i think it just sends a term to the process
[18:35] <chras> at least, thats what it appears to do
[18:35] <frew> right.