Martin Betak has uploaded a new change for review.

Change subject: vm: Move saveState() out of constructor
......................................................................

vm: Move saveState() out of constructor

Moved saveState() call to the begining of async start of VM in order to:
* Make the vm ctor side effect free
* Prevent from saveState being called in case the async start fails (incoming
  migration limit exceeded)

Change-Id: Ifb38fdc06bf1a7b881cd64d2af45a93b16c935ea
Signed-off-by: Martin Betak <mbe...@redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/50/53950/1

diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index a73da42..8586e18 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -292,7 +292,6 @@
         self._domain = DomainDescriptor.from_id(self.id)
         self._released = False
         self._releaseLock = threading.Lock()
-        self.saveState()
         self._watchdogEvent = {}
         self.arch = cpuarch.effective()
         self._powerDownEvent = threading.Event()
@@ -688,6 +687,7 @@
                 return
 
         self._vmStartEvent.set()
+        self.saveState()
         try:
             self.memCommit()
             with self._ongoingCreations:


-- 
To view, visit https://gerrit.ovirt.org/53950
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb38fdc06bf1a7b881cd64d2af45a93b16c935ea
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak <mbe...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to