The exitstatus on the process is a gevent.AsyncResult
(not an int). Use the try/except pattern for handling
errors instead.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
The last command a restart script outputs is 'done'
indicating the script does not require being restarted
further. Handle this case properly.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
The ceph daemons support being killed at a specific code point
with a config option. In some cases, we want to test a kill point
only once for a given daemon run (such as replay that only occurs
during daemon startup). This task allows running a script or executable
and (when the script sends a command to the task) restarting it with
a temporary config that has the appropriate kill point set. Once
the daemon asserts and gets restarted, the original config is used.
Adds a specific restart_with_args() method to the DaemonState in the
ceph task.
Right now this task follows the workunit task closely, but uses stdout/stdin
to specify when to restart a daemon.
Signed-off-by: Sam Lang <sam.lang@inktank.com>