xenserver: Fix interface reconfigure crash when setting fail_mode.
authorEthan Jackson <ethan@nicira.com>
Thu, 20 Jan 2011 01:57:08 +0000 (17:57 -0800)
committerEthan Jackson <ethan@nicira.com>
Thu, 20 Jan 2011 02:12:01 +0000 (18:12 -0800)
Interface reconfigure can crash when setting fail_mode if an
expected other_config setting is not set.

xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py

index a3d4bd24d54f48946875347324ad76eb273c3c24..22201ae27007059f7270b5321877890a7346b5b2 100644 (file)
@@ -334,7 +334,7 @@ def configure_datapath(pif):
     pool = db().get_pool_record()
 
     if pool:
-        fail_mode = pool['other_config']['vswitch-controller-fail-mode']
+        fail_mode = pool['other_config'].get('vswitch-controller-fail-mode')
     else:
         fail_mode = 'standalone'