From f72e2b3652e6438b0314ee3de2f071af3bf682fd Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Thu, 10 Dec 2009 15:21:56 -0800 Subject: [PATCH] xenserver: Remove references to "reload" in init script With ovs-vswitchd using the config DB, it is no longer necessary to tell it to reload its configuration file. This removes references to the need for reloading. It also cleans up some messages placed on the console during boot up. --- xenserver/etc_init.d_vswitch | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/xenserver/etc_init.d_vswitch b/xenserver/etc_init.d_vswitch index 10625289..7460a212 100755 --- a/xenserver/etc_init.d_vswitch +++ b/xenserver/etc_init.d_vswitch @@ -129,18 +129,6 @@ function remove_modules { fi } -function reload_vswitchd { - if [ -f "$VSWITCHD_PIDFILE" ]; then - "$appctl" --target=/var/run/ovs-vswitchd.`cat $VSWITCHD_PIDFILE`.ctl vswitchd/reload - fi -} - -function reload_brcompatd { - if [ -f "$BRCOMPATD_PIDFILE" ]; then - "$appctl" --target=/var/run/ovs-brcompatd.`cat $BRCOMPATD_PIDFILE`.ctl vlog/reopen - fi -} - function start_ovsdb_server { local syslog_opt="-vANY:SYSLOG:${OVSDB_SERVER_SYSLOG_LOGLEVEL}" local logfile_file_opt="" @@ -315,8 +303,6 @@ WARNING!!! Restarting vswitch on a live server is not guaranteed to work. It is provided as a convenience for those situations in which it does work. -If you just want to reload the configuration file, use "reload" -instead of restart. EOF read -s -r -n 1 -p "Countinue with restart (y/N): " response @@ -347,8 +333,12 @@ function start { if [ ! -e "$OVSDB_SERVER_DB" ]; then warning "$OVSDB_SERVER_DB does not exist" - action "Creating empty $OVSDB_SERVER_DB" $ovsdb_tool create "$OVSDB_SERVER_DB" "$VSWITCHD_OVSDB_SCHEMA" - action "Creating initial table in $OVSDB_SERVER_DB" $ovsdb_tool transact "$OVSDB_SERVER_DB" '[{"op": "insert", "table": "Open_vSwitch", "row": {}}]' + + action "Creating empty database $OVSDB_SERVER_DB" true + $ovsdb_tool create "$OVSDB_SERVER_DB" "$VSWITCHD_OVSDB_SCHEMA" + + action "Creating initial table in $OVSDB_SERVER_DB" true + $ovsdb_tool transact "$OVSDB_SERVER_DB" '[{"op": "insert", "table": "Open_vSwitch", "row": {}}]' fi start_ovsdb_server @@ -361,7 +351,6 @@ function start { start_vswitchd start_brcompatd - reload_vswitchd # ensures ovs-vswitchd has fully read config. touch /var/lock/subsys/vswitch } @@ -389,10 +378,6 @@ case "$1" in restart) restart ;; - reload) - reload_vswitchd - reload_brcompatd - ;; strace-vswitchd) shift strace -p $(cat "$VSWITCHD_PIDFILE") "$@" @@ -412,7 +397,7 @@ case "$1" in /usr/sbin/ovs-brcompatd -V ;; help) - printf "vswitch [start|stop|restart|reload|unload|status|version]\n" + printf "vswitch [start|stop|restart|unload|status|version]\n" ;; *) printf "Unknown command: $1\n" -- 2.30.2