Monitoring is a valid option on POSIX based platforms. The monitor creates an additional process to monitor the ovsdb-server daemon. If the daemon dies due to a programming error, then the monitor process starts a new copy of it. If the daemon dies or exits for another reason, the monitor process exits.
The monitor option is not currently enabled for either OVN Northbound or Southbound databases. The simplest method for doing this is to add --monitor to the calling lines in the start_ovsdb function in ovn-ctl, which is where ovsdb-server for ovn is currently started. This is the method employed by this patch. The second option would be to modify the code used by ovs-ctl to start ovsdb-server so that it will work for ovn, so that start_daemon from ovs-lib is used correctly and without modification. This option is certainly the more complex option, especially considering the northbound and southbound databases in ovn. Signed-off-by: Conner Herriges <conner.herri...@ibm.com> v4 changes: reverted ovs-lib to original form removed call to start_daemon in ovn-ctl changed commit message v3 changes: removed spacing errors and change log comments --- ovn/utilities/ovn-ctl | 4 ++-- utilities/ovs-lib.in | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ovn/utilities/ovn-ctl b/ovn/utilities/ovn-ctl index a4a9817..07bff8a 100755 --- a/ovn/utilities/ovn-ctl +++ b/ovn/utilities/ovn-ctl @@ -52,7 +52,7 @@ start_ovsdb () { set ovsdb-server - set "$@" --detach $OVN_NB_LOG --log-file=$OVN_NB_LOGFILE --remote=punix:$DB_NB_SOCK --remote=ptcp:$DB_NB_PORT:$DB_NB_ADDR --pidfile=$DB_NB_PID --unixctl=ovnnb_db.ctl + set "$@" --detach --monitor $OVN_NB_LOG --log-file=$OVN_NB_LOGFILE --remote=punix:$DB_NB_SOCK --remote=ptcp:$DB_NB_PORT:$DB_NB_ADDR --pidfile=$DB_NB_PID --unixctl=ovnnb_db.ctl $@ $DB_NB_FILE fi @@ -63,7 +63,7 @@ start_ovsdb () { set ovsdb-server - set "$@" --detach $OVN_SB_LOG --log-file=$OVN_SB_LOGFILE --remote=punix:$DB_SB_SOCK --remote=ptcp:$DB_SB_PORT:$DB_SB_ADDR --pidfile=$DB_SB_PID --unixctl=ovnsb_db.ctl + set "$@" --detach --monitor $OVN_SB_LOG --log-file=$OVN_SB_LOGFILE --remote=punix:$DB_SB_SOCK --remote=ptcp:$DB_SB_PORT:$DB_SB_ADDR --pidfile=$DB_SB_PID --unixctl=ovnsb_db.ctl $@ $DB_SB_FILE fi } diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in index cbad85a..020eb7b 100644 --- a/utilities/ovs-lib.in +++ b/utilities/ovs-lib.in @@ -155,6 +155,7 @@ start_daemon () { daemon=$1 strace="" + # drop core files in a sensible place test -d "$DAEMON_CWD" || install -d -m 755 -o root -g root "$DAEMON_CWD" set "$@" --no-chdir -- 2.7.4 (Apple Git-66) _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev