From: "Satoshi Uchida" Subject: [Patch] save/restore/migration bug fix Date: Wed, 11 Jan 2006 16:37:02 +0900 Message-ID: <01b001c61681$d07af870$4c87380a@ad.spf.cl.nec.co.jp> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_01B1_01C616CD.4062A070" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. ------=_NextPart_000_01B1_01C616CD.4062A070 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit 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 ------=_NextPart_000_01B1_01C616CD.4062A070 Content-Type: application/octet-stream; name="netif.py.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="netif.py.patch" diff -r da7873110bbb tools/python/xen/xend/server/netif.py=0A= --- a/tools/python/xen/xend/server/netif.py Mon Jan 9 18:46:46 2006=0A= +++ b/tools/python/xen/xend/server/netif.py Wed Jan 11 10:45:24 2006=0A= @@ -113,7 +113,7 @@=0A= script.replace(xroot.network_script_dir + = os.sep,=0A= "")])=0A= if ip:=0A= - result.append(['ip', ip.split(" ")])=0A= + result.append(['ip', ip])=0A= if bridge:=0A= result.append(['bridge', bridge])=0A= if mac:=0A= ------=_NextPart_000_01B1_01C616CD.4062A070 Content-Type: application/octet-stream; name="netif.py2.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="netif.py2.patch" diff -r da7873110bbb tools/python/xen/xend/server/netif.py=0A= --- a/tools/python/xen/xend/server/netif.py Mon Jan 9 18:46:46 2006=0A= +++ b/tools/python/xen/xend/server/netif.py Wed Jan 11 11:25:48 2006=0A= @@ -113,7 +113,8 @@=0A= script.replace(xroot.network_script_dir + = os.sep,=0A= "")])=0A= if ip:=0A= - result.append(['ip', ip.split(" ")])=0A= + for lip in ip.split(" "):=0A= + result.append(['ip', lip])=0A= if bridge:=0A= result.append(['bridge', bridge])=0A= if mac:=0A= ------=_NextPart_000_01B1_01C616CD.4062A070 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel ------=_NextPart_000_01B1_01C616CD.4062A070--