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-devel

[Xen-devel] [Patch] save/restore/migration bug fix

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [Patch] save/restore/migration bug fix
From: "Satoshi Uchida" <s-uchida@xxxxxxxxxxxxx>
Date: Wed, 11 Jan 2006 16:37:02 +0900
Delivery-date: Wed, 11 Jan 2006 07:43:32 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcYWgdBQHgma4o0wQZGZTQ3KeWqydA==
Hi, all.

If I try to save, restore and migration functionally after
a long separation, latter two function can not be handled.

This cause is that information between save and restore is
not corresponded. 

In config file, IP information within vif device is literal.
  ex. vif = [ 'ip=192.168.%d.1/24' % (vmid)]
            =>  vif : ['vif', ['ip', '192.168.2.225/24']]

In save / list information, IP information within vif device is list. 
  ex.  vif : ['vif', ['backend', '0'], ['script', 'vif-bridge'],
              ['ip', ['192.168.2.1/24']], ['mac', '00:16:3e:0b:10:ef']]

In restore / migration, IP information is analyzed and coupled.
So, with corresponded to config file,
   (netif:92) ['192.168.2.1/24'], None, None
with corresponded to save information
   (netif:92) [['192.168.2.1/24']], None, None.
(first elements is IP informaiton)

Therefore, difference of list or list of list is not make device
controller
create virtual device.

Here, I create two type of patch as following.

Type 1 is not split.
IP information is one string which is separated with space.

Type 2 is IP information is separate, but not create list structure.
Multiple (ip xxx.xxx.xxx.xxx) information are created.

I don't think situation which  one vif device handles more than two IP.
So, I don't guarantee the above situations. (In especially Type 2)


Type 1  ... netif.py.patch

diff -r da7873110bbb tools/python/xen/xend/server/netif.py
--- a/tools/python/xen/xend/server/netif.py     Mon Jan  9 18:46:46 2006
+++ b/tools/python/xen/xend/server/netif.py     Wed Jan 11 10:45:24 2006
@@ -113,7 +113,7 @@
                            script.replace(xroot.network_script_dir +
os.sep,
                                           "")])
         if ip:
-            result.append(['ip', ip.split(" ")])
+            result.append(['ip', ip])
         if bridge:
             result.append(['bridge', bridge])
         if mac:


Type 2 ... netif.py2.patch

                            script.replace(xroot.network_script_dir +
os.sep,
                                           "")])
         if ip:
-            result.append(['ip', ip.split(" ")])
+           for lip in ip:
+                result.append(['ip', lip])
         if bridge:
             result.append(['bridge', bridge])
         if mac:

Thank you.
=======================
Satoshi UCHIDA

Attachment: netif.py.patch
Description: Binary data

Attachment: netif.py2.patch
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [Patch] save/restore/migration bug fix, Satoshi Uchida <=