2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-25 15:07:05 +00:00

xenserver: Allow NULL pool in configuration cache.

InterfaceReconfigure assumes the pool is in the configuration
cache.  This is always true except when upgrading from an older
version of openvswitch which does record the pool.  This can cause
upgrades to lock up.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
This commit is contained in:
Ethan Jackson
2011-01-19 14:46:57 -08:00
parent 7b064a79a8
commit 0671665d93
2 changed files with 7 additions and 2 deletions

View File

@@ -332,7 +332,11 @@ def configure_datapath(pif):
'other-config:hwaddr=%s' % vsctl_escape(db().get_pif_record(pif)['MAC'])]
pool = db().get_pool_record()
fail_mode = pool['other_config']['vswitch-controller-fail-mode']
if pool:
fail_mode = pool['other_config']['vswitch-controller-fail-mode']
else:
fail_mode = 'standalone'
if fail_mode in ['standalone', 'secure']:
vsctl_argv += ['--', 'set', 'Bridge', bridge, 'fail_mode=%s' % fail_mode]