summaryrefslogtreecommitdiff
path: root/xenserver/opt_xensource_libexec_interface-reconfigure
diff options
context:
space:
mode:
authorIan Campbell <Ian.Campbell@citrix.com>2009-10-05 16:27:01 +0100
committerBen Pfaff <blp@nicira.com>2009-10-05 09:49:34 -0700
commit7744280b18438e6e75d4a1867e57b5f4e48ad0ad (patch)
tree62963535b9723ca703e9c2333745a0279c3f606c /xenserver/opt_xensource_libexec_interface-reconfigure
parentf17d7bd838a678b6ca1db63c15c567508836cfcf (diff)
downloadopenvswitch-7744280b18438e6e75d4a1867e57b5f4e48ad0ad.tar.gz
xenserver: Include bridge.*.xs-network-uuids for all networks
Previously I advised that only networks which were currently attached to the host be listed in /etc/ovs-vswitchd.conf. However I've just realised that this interacts badly with the slightly ugly special case used for PIF.currently-attached when reading from dbcache instead of talking to Xapi. This bites on boot when /etc/init.d/management-interface tries to plug a selection of PIFs which are deemed to be somehow required by xapi. (not helped by a bug in XenServer 5.7.0 which can cause this list to be larger than it should be and not internally consistent). For now I think it prudent to simply list all networks which could potentially be attached to a given datapath, until I can figure out what the sane fix is on the XenServer end. (I think there are two options for a proper fix, either inspect the current state of the network devices or assume dbcache represents the desired final state after devices are plugged on boot. I'm leaning towards the later since the dbcache should indicate the set of PIFs which were attached on shutdown, which xapi will likely be trying to replug on boot... Needs more thought though).
Diffstat (limited to 'xenserver/opt_xensource_libexec_interface-reconfigure')
-rwxr-xr-xxenserver/opt_xensource_libexec_interface-reconfigure18
1 files changed, 11 insertions, 7 deletions
diff --git a/xenserver/opt_xensource_libexec_interface-reconfigure b/xenserver/opt_xensource_libexec_interface-reconfigure
index f29e75b9c..7b0c9eff7 100755
--- a/xenserver/opt_xensource_libexec_interface-reconfigure
+++ b/xenserver/opt_xensource_libexec_interface-reconfigure
@@ -1448,9 +1448,13 @@ def action_up(pif):
for nwpif in db.get_pifs_by_device(db.get_pif_record(pif)['device']):
rec = db.get_pif_record(nwpif)
- if nwpif != pif and not rec['currently_attached']:
- log("Network PIF %s not currently attached (%s)" % (rec['uuid'],pifrec['uuid']))
- continue
+
+ # When state is read from dbcache PIF.currently_attached
+ # is always assumed to be false... Err on the side of
+ # listing even detached networks for the time being.
+ #if nwpif != pif and not rec['currently_attached']:
+ # log("Network PIF %s not currently attached (%s)" % (rec['uuid'],pifrec['uuid']))
+ # continue
nwrec = db.get_network_record(rec['network'])
cfgmod_argv += ['--add=bridge.%s.xs-network-uuids=%s' % (bridge, nwrec['uuid'])]
@@ -1514,10 +1518,10 @@ def action_down(pif):
ifdown(ipdev)
if dp:
- nw = db.get_pif_record(pif)['network']
- nwrec = db.get_network_record(nw)
- cfgmod_argv += ['# deconfigure xs-network-uuids']
- cfgmod_argv += ['--del-entry=bridge.%s.xs-network-uuids=%s' % (bridge,nwrec['uuid'])]
+ #nw = db.get_pif_record(pif)['network']
+ #nwrec = db.get_network_record(nw)
+ #cfgmod_argv += ['# deconfigure xs-network-uuids']
+ #cfgmod_argv += ['--del-entry=bridge.%s.xs-network-uuids=%s' % (bridge,nwrec['uuid'])]
log("deconfigure ipdev %s on %s" % (ipdev,bridge))
cfgmod_argv += ["# deconfigure ipdev %s" % ipdev]