[PATCH 14/14] Don't mark suspend as active until we know it is running

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

If suspend failed for some reason (eg too short duration) then
susquent 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
---
 src/util/virnodesuspend.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/util/virnodesuspend.c b/src/util/virnodesuspend.c
index 3805e9c..f585847 100644
--- a/src/util/virnodesuspend.c
+++ b/src/util/virnodesuspend.c
@@ -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();
-- 
1.7.6.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]