Skip to content

Commit

Permalink
utilities: add conditional {start/stop}_ic_ovsdb on start_ic command
Browse files Browse the repository at this point in the history
This commit adds capability to start and stop ovsdb-server for OVN interconnection
when {start,stop}_ic is called.
It changes previous behavior where {start,stop}_ic only started/stopped ovn-ic daemon without ovn-ic DBs.

If one wants to save previous behavior, --ovn-manage-ovsdb=no must be passed to ovn-ctl script.

Signed-off-by: Vladislav Odintsov <odivlad@gmail.com>
  • Loading branch information
odivlad committed Dec 21, 2020
1 parent 0283ef3 commit fdc0c9a
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion utilities/ovn-ctl
Expand Up @@ -485,6 +485,19 @@ start_northd () {

start_ic () {
if [ ! -e $ovn_ic_db_conf_file ]; then
if test X"$OVN_MANAGE_OVSDB" = Xyes; then
start_ic_ovsdb

if ! pidfile_is_running $DB_IC_NB_PID; then
log_failure_msg "OVN IC Northbound DB is not running"
exit
fi
if ! pidfile_is_running $DB_IC_SB_PID; then
log_failure_msg "OVN IC Southbound DB is not running"
exit
fi
fi

ovn_ic_params="--ovnnb-db=$OVN_NORTHD_NB_DB \
--ovnsb-db=$OVN_NORTHD_SB_DB \
--ic-nb-db=$OVN_IC_NB_DB \
Expand Down Expand Up @@ -581,6 +594,9 @@ stop_northd () {
}

stop_ic () {
if test X"$OVN_MANAGE_OVSDB" = Xyes; then
stop_ic_ovsdb
fi
OVS_RUNDIR=${OVS_RUNDIR} stop_ovn_daemon ovn-ic
}

Expand Down Expand Up @@ -906,7 +922,7 @@ Options:
--ovn-northd-ssl-ca-cert=CERT OVN Northd SSL CA certificate file
--ovn-manage-ovsdb=yes|no Whether or not the OVN NB/SB databases should be
automatically started and stopped along
with ovn-northd. The default is "yes". If
with ovn-northd and ovn-ic. The default is "yes". If
this is set to "no", the "start_ovsdb" and
"stop_ovsdb" commands must be used to start
and stop the OVN databases.
Expand Down

0 comments on commit fdc0c9a

Please sign in to comment.