Revision 91104b80 qa/qa_daemon.py
b/qa/qa_daemon.py | ||
---|---|---|
61 | 61 |
raise qa_error.Error("instance shutdown failed") |
62 | 62 |
|
63 | 63 |
|
64 |
def _StartInstance(name): |
|
65 |
"""Starts instance and waits for completion. |
|
66 |
|
|
67 |
@param name: full name of the instance |
|
68 |
|
|
69 |
""" |
|
70 |
AssertCommand(["gnt-instance", "start", name]) |
|
71 |
|
|
72 |
if not bool(_InstanceRunning(name)): |
|
73 |
raise qa_error.Error("instance start failed") |
|
74 |
|
|
75 |
|
|
64 | 76 |
def _ResetWatcherDaemon(): |
65 | 77 |
"""Removes the watcher daemon's state file. |
66 | 78 |
|
... | ... | |
129 | 141 |
|
130 | 142 |
""" |
131 | 143 |
inst_name = qa_utils.ResolveInstanceName(instance["name"]) |
144 |
inst_was_running = bool(_InstanceRunning(inst_name)) |
|
132 | 145 |
|
133 | 146 |
_ResetWatcherDaemon() |
134 | 147 |
|
... | ... | |
145 | 158 |
raise qa_error.Error(msg) |
146 | 159 |
|
147 | 160 |
AssertCommand(["gnt-instance", "info", inst_name]) |
161 |
|
|
162 |
if inst_was_running: |
|
163 |
_StartInstance(inst_name) |
Also available in: Unified diff