From: Ben Pfaff Date: Wed, 24 Feb 2010 23:45:11 +0000 (-0800) Subject: xenserver: Avoid error due to missing MTU fields on XenServer 5.5. X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=3a32d4ca77ab91c495b3628b58c3967af7b6ff39;hp=02dd3123a0e312f1d33403e744af52dd6096f12d;p=sliver-openvswitch.git xenserver: Avoid error due to missing MTU fields on XenServer 5.5. 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 --- diff --git a/xenserver/opt_xensource_libexec_InterfaceReconfigure.py b/xenserver/opt_xensource_libexec_InterfaceReconfigure.py index 3c3a0195a..570ebccbe 100644 --- a/xenserver/opt_xensource_libexec_InterfaceReconfigure.py +++ b/xenserver/opt_xensource_libexec_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'] = {}