]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
task/restart: Fix check for done
authorSam Lang <sam.lang@inktank.com>
Mon, 18 Mar 2013 16:27:11 +0000 (11:27 -0500)
committerSam Lang <sam.lang@inktank.com>
Mon, 18 Mar 2013 16:27:11 +0000 (11:27 -0500)
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>
teuthology/task/restart.py

index 43153ae9257d77810757e2a82239c79f53f9aac5..141f33c6b00f2e0f84f78bbfe77d7cf5ebcb5124 100644 (file)
@@ -135,7 +135,7 @@ def task(ctx, config):
                     log.debug('script command: {c}'.format(c=l))
                     ll = l.strip()
                     cmd = ll.split(' ')
-                    if cmd == "done":
+                    if cmd[0] == "done":
                         break
                     assert cmd[0] == 'restart', "script sent invalid command request to kill task"
                     # cmd should be: restart <role> <id> <conf_key1> <conf_value1> <conf_key2> <conf_value2>