X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=xenserver%2Fetc_init.d_vswitch;h=7263336b3ea5e03c5d60de2297c5533de4ed416c;hb=c100e025e2ca1bc330512e003bac8359ee65318d;hp=de7cda3ec575e5a36b03df7fabf6d0a9647ce80a;hpb=e404c41feade9d44ffc3711407f8d6e61340171a;p=openvswitch diff --git a/xenserver/etc_init.d_vswitch b/xenserver/etc_init.d_vswitch index de7cda3e..7263336b 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,11 +333,13 @@ 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 -vANY:console:emer create "$OVSDB_SERVER_DB" "$VSWITCHD_OVSDB_SCHEMA" fi start_ovsdb_server + $vsctl --no-wait init if [ ! -e /var/run/vswitch.booted ]; then touch /var/run/vswitch.booted for bridge in $($vsctl list-br); do @@ -361,7 +349,6 @@ function start { start_vswitchd start_brcompatd - reload_vswitchd # ensures ovs-vswitchd has fully read config. touch /var/lock/subsys/vswitch } @@ -389,10 +376,6 @@ case "$1" in restart) restart ;; - reload) - reload_vswitchd - reload_brcompatd - ;; strace-vswitchd) shift strace -p $(cat "$VSWITCHD_PIDFILE") "$@" @@ -402,15 +385,17 @@ case "$1" in strace -p $(cat "$BRCOMPATD_PIDFILE") "$@" ;; status) + status -p ovsdb-server.pid ovsdb-server status -p ovs-vswitchd.pid ovs-vswitchd status -p ovs-brcompatd.pid ovs-brcompatd ;; version) + /usr/sbin/ovsdb-server -V /usr/sbin/ovs-vswitchd -V /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"