Change in vdsm[master]: Add migration network support.

ilvovsky at redhat.com ilvovsky at redhat.com
Wed Feb 6 09:50:14 UTC 2013


Igor Lvovsky has uploaded a new change for review.

Change subject: Add migration network support.
......................................................................

Add migration network support.

Add additional parameter to vmMigrate to support dedicated migration network
http://www.ovirt.org/Features/Migration_Network

Change-Id: I17d760c7421e765454e13ee5b7d8be23e6b7e383
Signed-off-by: Igor Lvovsky <ilvovsky at redhat.com>
---
M vdsm/API.py
M vdsm/libvirtvm.py
M vdsm/vm.py
M vdsm_api/vdsmapi-schema.json
4 files changed, 13 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/95/11795/1

diff --git a/vdsm/API.py b/vdsm/API.py
index 0046b57..6fe7028 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -453,6 +453,7 @@
             *mode* - ``remote``/``file``
             *method* - ``online``
             *downtime* - allowed down time during online migration
+            *miguri* - remote host uri dedicated to migration
         """
         params['vmId'] = self._UUID
         self.log.debug(params)
diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py
index 6173510..68922bc 100644
--- a/vdsm/libvirtvm.py
+++ b/vdsm/libvirtvm.py
@@ -473,7 +473,11 @@
             else:
                 transport = 'tcp'
             duri = 'qemu+%s://%s/system' % (transport, self.remoteHost)
-            muri = 'tcp://%s' % self.remoteHost
+            if self._vm.conf['_migrationParams']['miguri']:
+                muri = 'tcp://%s' % self._vm.conf['_migrationParams']['miguri']
+            else:
+                muri = 'tcp://%s' % self.remoteHost
+
             self._vm.log.debug('starting migration to %s', duri)
 
             t = MigrationDowntimeThread(self._vm, int(self._downtime),
diff --git a/vdsm/vm.py b/vdsm/vm.py
index 2d17847..478f468 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -95,7 +95,7 @@
 
     def __init__(self, vm, dst='', dstparams='',
                  mode='remote', method='online',
-                 tunneled=False, **kwargs):
+                 tunneled=False, miguri='', **kwargs):
         self.log = vm.log
         self._vm = vm
         self._dst = dst
@@ -104,6 +104,7 @@
         self._dstparams = dstparams
         self._machineParams = {}
         self._tunneled = utils.tobool(tunneled)
+        self._miguri = miguri
         self._downtime = kwargs.get('downtime') or \
             config.get('vars', 'migration_downtime')
         self.status = {
@@ -268,7 +269,8 @@
                         'dst': self._dst,
                         'mode': self._mode,
                         'method': self._method,
-                        'dstparams': self._dstparams}
+                        'dstparams': self._dstparams,
+                        'miguri': self._miguri}
                     self._vm.saveState()
                     self._startUnderlyingMigration()
                 self._finishSuccessfully()
diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json
index 29051a8..ecc7fa8 100644
--- a/vdsm_api/vdsmapi-schema.json
+++ b/vdsm_api/vdsmapi-schema.json
@@ -5422,12 +5422,14 @@
 #
 # @tunneled:   #optional use libvirt's tunneled migration. default it False.
 #
+# @miguri:     #optional The destination's host uri dedicated for migration.
+#
 # Since: 4.10.0
 ##
 {'type': 'MigrateParams',
  'data': {'vmId': 'UUID', 'dst': 'str', 'dstparams': 'str',
           '*mode': 'MigrateMode', '*method': 'MigrateMethod',
-          '*tunneled': 'bool'}}
+          '*tunneled': 'bool', 'miguri': 'str'}}
 
 ##
 # @VM.migrate:


--
To view, visit http://gerrit.ovirt.org/11795
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I17d760c7421e765454e13ee5b7d8be23e6b7e383
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Igor Lvovsky <ilvovsky at redhat.com>


More information about the vdsm-patches mailing list