Change in vdsm[master]: migration: allow one-step downtime settings
fromani at redhat.com
fromani at redhat.com
Fri Jun 19 12:01:17 UTC 2015
Francesco Romani has uploaded a new change for review.
Change subject: migration: allow one-step downtime settings
......................................................................
migration: allow one-step downtime settings
In specific environments, it may be useful
to have one-step downtime setting.
This actually translates to just set the specified
downtime and go ahead.
Change-Id: I2e90ecf04caceddfa886563df4aee825b88b9bd8
Signed-off-by: Francesco Romani <fromani at redhat.com>
---
M vdsm/virt/migration.py
1 file changed, 12 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/76/42576/1
diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py
index 1e9710e..88ef6e7 100644
--- a/vdsm/virt/migration.py
+++ b/vdsm/virt/migration.py
@@ -428,6 +428,18 @@
def run(self):
self._vm.log.debug('migration downtime thread started')
+ if DOWNTIME_STEPS > 1:
+ self._update_downtime()
+ else:
+ self._vm._dom.migrateSetMaxDowntime(self._downtime, 0)
+
+ self._vm.log.debug('migration downtime thread exiting')
+
+ def stop(self):
+ self._vm.log.debug('stopping migration downtime thread')
+ self._stop.set()
+
+ def _update_downtime(self):
for downtime in exponential_downtime(self._downtime,
self.DOWNTIME_STEPS):
self._stop.wait(self._wait / self.DOWNTIME_STEPS)
@@ -437,12 +449,6 @@
self._vm.log.debug('setting migration downtime to %d', downtime)
self._vm._dom.migrateSetMaxDowntime(downtime, 0)
-
- self._vm.log.debug('migration downtime thread exiting')
-
- def stop(self):
- self._vm.log.debug('stopping migration downtime thread')
- self._stop.set()
class MonitorThread(threading.Thread):
--
To view, visit https://gerrit.ovirt.org/42576
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2e90ecf04caceddfa886563df4aee825b88b9bd8
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
More information about the vdsm-patches
mailing list