On Tue, 2010-03-09 at 22:00 -0500, Marcel Kinard wrote: > Here's a scenario: I have two processes - an application and a > watchdog. The watchdog exercises the application (instead of just > checking its presence). If the watchdog sees that the application > health is poor, I want the application to be restarted. > This should work exactly as you've written it.
The only reason I can think of (without logs) of why this might not be working is if the watchdog daemonised, and thus Upstart had lost track of it. If you run "initctl log-priority info" you'll get more detailed logs in syslog, start the application (and thus the watchdog), then emit the event. If you could then attach this more complete log, we'd have a better idea what's going on. > Another option would be for the watchdog to explicitly invoke "initctl > restart application" and for the watchdog itself to stay up during the > application restart. Would that initctl invocation block until the > application was stopped and restarted? > Yes, initctl blocks until the job reaches the intended new state. > What would be nice is a "restart on ..." stanza. I could also see that > an "restart limit ..." stanza should follow. > We had something like this once; it got removed when the states were simplified such that a restart was roughly equivalent to stop/start. If it came back, you'd then have to have additional events for restarting and restarted. Scott -- Have you ever, ever felt like this? Had strange things happen? Are you going round the twist?
signature.asc
Description: This is a digitally signed message part
-- upstart-devel mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/upstart-devel
