From 9cef6345b7f0d8981e00a5fabee59697d817cf3c Mon Sep 17 00:00:00 2001 From: Andrew Evans Date: Mon, 7 Feb 2011 14:41:09 -0800 Subject: [PATCH] xenserver: Make openvswitch-cfg-update reset 'manager_options' column. --- xenserver/etc_xapi.d_plugins_openvswitch-cfg-update | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update b/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update index 5189d043..721fe647 100755 --- a/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update +++ b/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update @@ -128,8 +128,7 @@ def update(session, args): return "No change to configuration" def vswitchCurrentController(): - controller = vswitchCfgQuery(["get", "Open_vSwitch", - ".", "managers"]).strip('[]"') + controller = vswitchCfgQuery(["get-manager"]) if controller == "": return controller if len(controller) < 4 or controller[0:4] != "ssl:": @@ -138,20 +137,19 @@ def vswitchCurrentController(): return controller.split(':')[1] def removeControllerCfg(): - vswitchCfgMod(["--", "clear", "Open_vSwitch", ".", "managers", + vswitchCfgMod(["--", "del-manager", "--", "del-ssl"]) def setControllerCfg(controller): # /etc/xensource/xapi-ssl.pem is mentioned twice below because it # contains both the private key and the certificate. - vswitchCfgMod(["--", "clear", "Open_vSwitch", ".", "managers", + vswitchCfgMod(["--", "del-manager", "--", "del-ssl", "--", "--bootstrap", "set-ssl", "/etc/xensource/xapi-ssl.pem", "/etc/xensource/xapi-ssl.pem", cacert_filename, - "--", "set", "Open_vSwitch", ".", - 'managers="ssl:' + controller + ':6632"']) + "--", "set-manager", 'ssl:' + controller + ':6632']) def vswitchCfgQuery(action_args): cmd = [vsctl, "--timeout=5", "-vANY:console:emer"] + action_args -- 2.30.2