From ecd5dcf227a414242205663d34f30e20ab4cecf4 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 8 Jul 2010 14:30:18 +0100 Subject: [PATCH] [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 CC: Ian Campbell Signed-off-by: Ben Pfaff Signed-off-by: Ian Campbell --- .../opt_xensource_libexec_InterfaceReconfigure.py | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) --- scripts/InterfaceReconfigure.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/InterfaceReconfigure.py b/scripts/InterfaceReconfigure.py index 3c3a0195..570ebccb 100644 --- a/scripts/InterfaceReconfigure.py +++ b/scripts/InterfaceReconfigure.py @@ -402,6 +402,10 @@ class DatabaseCache(object): 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'] = {} -- 2.39.5