Skip to content

Commit

Permalink
fix: ovn-central check if it exits in NODE_IPS
Browse files Browse the repository at this point in the history
(cherry picked from commit f2f6480)
  • Loading branch information
oilbeater committed Nov 25, 2020
1 parent cf4c412 commit 3371ce4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dist/images/start-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ if [[ "$ENABLE_SSL" == "false" ]]; then
ovn-sbctl set-connection ptcp:"${DB_SB_PORT}":["${DB_SB_ADDR}"]
ovn-sbctl set Connection . inactivity_probe=0
else
if [[ ! "$NODE_IPS" =~ "$POD_IP" ]]; then
echo "ERROR! host ip $POD_IP not in env NODE_IPS $NODE_IPS"
exit 1
fi
/usr/share/ovn/scripts/ovn-ctl stop_northd

nb_leader_ip=$(get_leader_ip nb)
Expand Down Expand Up @@ -135,6 +139,10 @@ else
ovn-sbctl -p /var/run/tls/key -c /var/run/tls/cert -C /var/run/tls/cacert set-connection pssl:"${DB_SB_PORT}":["${DB_SB_ADDR}"]
ovn-sbctl -p /var/run/tls/key -c /var/run/tls/cert -C /var/run/tls/cacert set Connection . inactivity_probe=0
else
if [[ ! "$NODE_IPS" =~ "$POD_IP" ]]; then
echo "ERROR! host ip $POD_IP not in env NODE_IPS $NODE_IPS"
exit 1
fi
/usr/share/ovn/scripts/ovn-ctl stop_northd

nb_leader_ip=$(get_leader_ip nb)
Expand Down

0 comments on commit 3371ce4

Please sign in to comment.