mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 21:15:20 +00:00
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
This commit is contained in:
parent
9ae0b8349c
commit
a82ed6a0c3
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user