Only shut down VM if it is running
This commit is contained in:
parent
ac00f7c4c8
commit
ea5512e3d8
|
@ -4476,13 +4476,14 @@ def vm_worker_promote_mirror(
|
||||||
total=total_stages,
|
total=total_stages,
|
||||||
)
|
)
|
||||||
|
|
||||||
retcode, retmsg = shutdown_vm(zkhandler, domain, wait=True)
|
if vm_detail["state"] in ["start"]:
|
||||||
if not retcode:
|
retcode, retmsg = shutdown_vm(zkhandler, domain, wait=True)
|
||||||
fail(
|
if not retcode:
|
||||||
celery,
|
fail(
|
||||||
"Failed to shut down VM",
|
celery,
|
||||||
)
|
"Failed to shut down VM",
|
||||||
return False
|
)
|
||||||
|
return False
|
||||||
|
|
||||||
#
|
#
|
||||||
# 2. Create snapshot
|
# 2. Create snapshot
|
||||||
|
|
Loading…
Reference in New Issue