Skip to content

Commit

Permalink
Add monitoring to ovsdb-server
Browse files Browse the repository at this point in the history
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.herriges@ibm.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
  • Loading branch information
Conner Herriges authored and blp committed Aug 26, 2016
1 parent 4bb7f56 commit 1b37392
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ovn/utilities/ovn-ctl
Expand Up @@ -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
Expand All @@ -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
}
Expand Down

0 comments on commit 1b37392

Please sign in to comment.