From 5de7052b9b5fe58628057984ddc99e9cf8a66596 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Wed, 9 Sep 2009 18:09:02 +0100 Subject: [PATCH] Only write Network.PIF elements for this host to dbcache. --- xenserver/opt_xensource_libexec_interface-reconfigure | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xenserver/opt_xensource_libexec_interface-reconfigure b/xenserver/opt_xensource_libexec_interface-reconfigure index fdb91abe..e77e85b1 100755 --- a/xenserver/opt_xensource_libexec_interface-reconfigure +++ b/xenserver/opt_xensource_libexec_interface-reconfigure @@ -456,7 +456,11 @@ class DatabaseCache(object): rec = session.xenapi.network.get_record(n) self.__networks[n] = {} for f in NETWORK_ATTRS: - self.__networks[n][f] = rec[f] + if f == "PIFs": + # drop PIFs on other hosts + self.__networks[n][f] = [p for p in rec[f] if self.__pif_on_host(p)] + else: + self.__networks[n][f] = rec[f] self.__networks[n]['other_config'] = {} for f in NETWORK_OTHERCONFIG_ATTRS: if not rec['other_config'].has_key(f): continue -- 2.30.2