Skip to contentSkip to conversation

save/restore/migration bug fix

PATCH New Satoshi Uchida 1 participant 1 message Jan 11, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 save/restore/migration bug fix

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

tools/python/xen/xend/server/netif.py Wed Jan 11 10:45:24 2006 renamed from tools/python/xen/xend/server/netif.py Mon Jan 9 18:46:46 2006 +0 -0
diff -r da7873110bbb tools/python/xen/xend/server/netif.py
@@ -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

tools/python/xen/xend/server/netif.py Wed Jan 11 10:45:24 2006 renamed from tools/python/xen/xend/server/netif.py Mon Jan 9 18:46:46 2006 +1 -1
diff -r da7873110bbb tools/python/xen/xend/server/netif.py
@@ -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:
tools/python/xen/xend/server/netif.py Wed Jan 11 11:25:48 2006 renamed from tools/python/xen/xend/server/netif.py Mon Jan 9 18:46:46 2006 +2 -1
diff -r da7873110bbb tools/python/xen/xend/server/netif.py
@@ -113,7 +113,8 @@
                            script.replace(xroot.network_script_dir + os.sep,
                                           "")])
         if ip:
-            result.append(['ip', ip.split(" ")])
+      for lip in ip.split(" "):
+                result.append(['ip', lip])
         if bridge:
             result.append(['bridge', bridge])
         if mac:

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel