From: Ben Pfaff Date: Thu, 14 May 2009 23:13:30 +0000 (-0700) Subject: xenserver: Avoid printing log messages to the console from scripts. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e84053950a52f4dfd80ef00d87c329739819036b;p=openvswitch xenserver: Avoid printing log messages to the console from scripts. Log messages from cfg-mode tended to overwrite random bits of the xsconsole screen. Bug #1315. --- diff --git a/xenserver/etc_xapi.d_plugins_vswitch-cfg-update b/xenserver/etc_xapi.d_plugins_vswitch-cfg-update index dc7b4a17..8d254587 100755 --- a/xenserver/etc_xapi.d_plugins_vswitch-cfg-update +++ b/xenserver/etc_xapi.d_plugins_vswitch-cfg-update @@ -102,7 +102,8 @@ def vswitchCfgQuery(key): return output def vswitchCfgMod(action_args): - cmd = [cfg_mod, "--config-file=" + vswitchd_cfg_filename] + action_args + cmd = [cfg_mod, "-vANY:console:emer", + "--config-file=" + vswitchd_cfg_filename] + action_args exitcode = subprocess.call(cmd) if exitcode != 0: log.error("cfg-mod failed with exit code " diff --git a/xenserver/etc_xensource_scripts_vif b/xenserver/etc_xensource_scripts_vif index 670c22fd..33312423 100755 --- a/xenserver/etc_xensource_scripts_vif +++ b/xenserver/etc_xensource_scripts_vif @@ -121,7 +121,8 @@ remove) xenstore-rm "${HOTPLUG}/hotplug" vif=vif${DOMID}.${DEVID} logger -t scripts-vif "${vif} has been removed" - $cfg-mod -F /etc/vswitchd.conf --del-match="bridge.*.port=${vif}" \ + $cfg-mod -vANY:console:emer -F /etc/vswitchd.conf \ + --del-match="bridge.*.port=${vif}" \ --del-match="vlan.${vif}.[!0-9]*" ;; esac diff --git a/xenserver/opt_xensource_libexec_interface-reconfigure b/xenserver/opt_xensource_libexec_interface-reconfigure index 3ec78262..0f9acef4 100755 --- a/xenserver/opt_xensource_libexec_interface-reconfigure +++ b/xenserver/opt_xensource_libexec_interface-reconfigure @@ -743,7 +743,8 @@ def configure_netdev(pif): print 'failed.' def modify_config(commands): - run_command(['/root/vswitch/bin/cfg-mod', '-F', '/etc/vswitchd.conf'] + run_command(['/root/vswitch/bin/cfg-mod', '-vANY:console:emer', + '-F', '/etc/vswitchd.conf'] + commands + ['-c']) run_command(['/sbin/service', 'vswitch', 'reload']) diff --git a/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureNiciraVSwitch.py b/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureNiciraVSwitch.py index eef2af9e..26641066 100644 --- a/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureNiciraVSwitch.py +++ b/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureNiciraVSwitch.py @@ -77,7 +77,8 @@ class VSwitchConfig: @staticmethod def Get(key): - cmd = [cfg_mod, "--config-file=" + vswitchd_cfg_filename, "-q", key] + cmd = [cfg_mod, "-vANY:console:emer", "-F", vswitchd_cfg_filename, + "-q", key] output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate() if len(output) == 0 or output[0] == None: output = ""