[ovs-dev] [PATCH 5/5] Only write Network.PIF elements for this host to dbcache.

Ian Campbell ian.campbell at citrix.com
Wed Sep 9 17:09:02 UTC 2009


---
 .../opt_xensource_libexec_interface-reconfigure    |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/xenserver/opt_xensource_libexec_interface-reconfigure b/xenserver/opt_xensource_libexec_interface-reconfigure
index fdb91ab..e77e85b 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
-- 
1.5.6.5





More information about the dev mailing list