WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] allow a port to be specified for migration.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] allow a port to be specified for migration.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 08 Dec 2005 13:54:06 +0000
Delivery-date: Thu, 08 Dec 2005 13:54:43 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User vhanquez@xxxxxxxxxxxxxxxxxxxxxxx
# Node ID 7d7973a21a3d28aaf63829259acc6558c0a7c317
# Parent  1f6ff996a9feb64f395ea3c3934cc87b80ea6db8
allow a port to be specified for migration.

Signed-off-by: Vincent Hanquez <vincent@xxxxxxxxxxxxx>

diff -r 1f6ff996a9fe -r 7d7973a21a3d tools/python/xen/xend/XendClient.py
--- a/tools/python/xen/xend/XendClient.py       Wed Dec  7 17:59:33 2005
+++ b/tools/python/xen/xend/XendClient.py       Thu Dec  8 07:11:09 2005
@@ -256,12 +256,13 @@
                              {'op'      : 'save',
                               'file'    : filename })
 
-    def xend_domain_migrate(self, id, dst, live=0, resource=0):
+    def xend_domain_migrate(self, id, dst, live=0, resource=0, port=0):
         return self.xendPost(self.domainurl(id),
                              {'op'         : 'migrate',
                               'destination': dst,
                               'live'       : live,
-                              'resource'   : resource })
+                              'resource'   : resource,
+                              'port'       : port })
 
     def xend_domain_pincpu(self, id, vcpu, cpumap):
         return self.xendPost(self.domainurl(id),
diff -r 1f6ff996a9fe -r 7d7973a21a3d tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Wed Dec  7 17:59:33 2005
+++ b/tools/python/xen/xend/XendDomain.py       Thu Dec  8 07:11:09 2005
@@ -390,12 +390,13 @@
                 raise XendError(str(ex))
         return val       
 
-    def domain_migrate(self, domid, dst, live=False, resource=0):
+    def domain_migrate(self, domid, dst, live=False, resource=0, port=0):
         """Start domain migration."""
 
         dominfo = self.domain_lookup(domid)
 
-        port = xroot.get_xend_relocation_port()
+        if port == 0:
+            port = xroot.get_xend_relocation_port()
         try:
             sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
             sock.connect((dst, port))
diff -r 1f6ff996a9fe -r 7d7973a21a3d tools/python/xen/xend/server/SrvDomain.py
--- a/tools/python/xen/xend/server/SrvDomain.py Wed Dec  7 17:59:33 2005
+++ b/tools/python/xen/xend/server/SrvDomain.py Thu Dec  8 07:11:09 2005
@@ -90,7 +90,8 @@
                     [['dom',         'int'],
                      ['destination', 'str'],
                      ['live',        'int'],
-                     ['resource',    'int']])
+                     ['resource',    'int'],
+                     ['port',        'int']])
         return fn(req.args, {'dom': self.dom.domid})
 
     def op_pincpu(self, _, req):
diff -r 1f6ff996a9fe -r 7d7973a21a3d tools/python/xen/xm/migrate.py
--- a/tools/python/xen/xm/migrate.py    Wed Dec  7 17:59:33 2005
+++ b/tools/python/xen/xm/migrate.py    Thu Dec  8 07:11:09 2005
@@ -40,6 +40,10 @@
           fn=set_true, default=0,
           use="Use live migration.")
 
+gopts.opt('port', short='p',
+          fn=set_int, default=0,
+          use="Use specified port for migration.")
+
 gopts.opt('resource', short='r', val='MBIT',
           fn=set_int, default=0,
           use="Set level of resource usage for migration.")
@@ -60,5 +64,5 @@
     dst = args[1]
     if dom in [DOM0_NAME, DOM0_ID]:
         opts.err('Cannot migrate ' + dom)
-    server.xend_domain_migrate(dom, dst, opts.vals.live, opts.vals.resource)
+    server.xend_domain_migrate(dom, dst, opts.vals.live, opts.vals.resource, 
opts.vals.port)
         

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] allow a port to be specified for migration., Xen patchbot -unstable <=