提交 a82ed6a0 编写于 作者: D Daniel P. Berrange

Don't mark suspend as active until we know it is running

If suspend failed for some reason (e.g. too short duration) then
subsequent attempts to trigger suspend were rejected because we
had already marked a suspend as being in progress

* src/util/virnodesuspend.c: Don't mark suspend as active
  until we've successfully triggered it
上级 9ae0b834
......@@ -202,7 +202,6 @@ int nodeSuspendForDuration(virConnectPtr conn ATTRIBUTE_UNUSED,
_("Suspend operation already in progress"));
goto cleanup;
}
aboutToSuspend = true;
/* Check if the host supports the requested suspend target */
switch (target) {
......@@ -245,6 +244,7 @@ int nodeSuspendForDuration(virConnectPtr conn ATTRIBUTE_UNUSED,
goto cleanup;
}
aboutToSuspend = true;
ret = 0;
cleanup:
virNodeSuspendUnlock();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册