From c2875f43a2de6e3d8c31b63601aa136c64a1053e Mon Sep 17 00:00:00 2001 From: Ethan Jackson Date: Wed, 19 Jan 2011 17:57:08 -0800 Subject: [PATCH] xenserver: Fix interface reconfigure crash when setting fail_mode. Interface reconfigure can crash when setting fail_mode if an expected other_config setting is not set. --- xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py b/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py index a3d4bd24..22201ae2 100644 --- a/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py +++ b/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py @@ -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' -- 2.30.2