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

[Xen-API] [PATCH 1 of 7] [PATCH] xenserver: Avoid error due to missing M

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 1 of 7] [PATCH] xenserver: Avoid error due to missing MTU fields on XenServer 5.5
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Thu, 8 Jul 2010 14:30:43 +0100
Delivery-date: Thu, 08 Jul 2010 06:42:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1278595842@ely>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1278595842@ely>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.4.3
# HG changeset patch
# User Ben Pfaff <blp@xxxxxxxxxx>
# Date 1278595818 -3600
# Node ID e778c60f347554f7e3295a7c3d7a1618e36626aa
# Parent  b4aadd0428adf9c2fb17156ff211d7761cf58895
[PATCH] xenserver: Avoid error due to missing MTU fields on XenServer 5.5.

>From 3a32d4ca77ab91c495b3628b58c3967af7b6ff39 Mon Sep 17 00:00:00 2001
Date: Wed, 24 Feb 2010 15:45:11 -0800
The network records in XenServer 5.5 do not have an MTU field, so allow
these to be missing.

Diagnosed-by: Reid Price <reid@xxxxxxxxxx>
CC: Ian Campbell <ian.campbell@xxxxxxxxxx>
Signed-off-by: Ben Pfaff <blp@xxxxxxxxxx>
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 .../opt_xensource_libexec_InterfaceReconfigure.py  |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff -r b4aadd0428ad -r e778c60f3475 scripts/InterfaceReconfigure.py
--- a/scripts/InterfaceReconfigure.py   Thu Jul 08 14:25:51 2010 +0100
+++ b/scripts/InterfaceReconfigure.py   Thu Jul 08 14:30:18 2010 +0100
@@ -402,6 +402,10 @@
                 if f == "PIFs":
                     # drop PIFs on other hosts
                     self.__networks[n][f] = [p for p in rec[f] if 
self.__pif_on_host(p)]
+                elif f == "MTU" and f not in rec:
+                    # XenServer 5.5 network records did not have an
+                    # MTU field, so allow this to be missing.
+                    pass
                 else:
                     self.__networks[n][f] = rec[f]
             self.__networks[n]['other_config'] = {}
 scripts/InterfaceReconfigure.py |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)


Attachment: txtzPkRHX9j4n.txt
Description: Text Data

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api