Skip to content

Commit

Permalink
fix: remove wait ovn sb
Browse files Browse the repository at this point in the history
After 2215c05 ovs-ovn no longer need cluster ip
  • Loading branch information
oilbeater committed Jun 7, 2021
1 parent 904905f commit eef1b0a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 40 deletions.
22 changes: 0 additions & 22 deletions dist/images/start-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,6 @@ if [[ "$ENABLE_SSL" == "false" ]]; then
ovn-sbctl --no-leader-only set-connection ptcp:"${DB_SB_PORT}":[::]
ovn-sbctl --no-leader-only set Connection . inactivity_probe=180000
else
while ! nc -z "${nb_leader_ip}" "${DB_NB_PORT}" >/dev/null;
do
echo "sleep 5 seconds, waiting for ovn-nb ${nb_leader_ip}:${DB_NB_PORT} ready "
sleep 5;
done
while ! nc -z "${sb_leader_ip}" "${DB_SB_PORT}" >/dev/null;
do
echo "sleep 5 seconds, waiting for ovn-sb ${sb_leader_ip}:${DB_SB_PORT} ready "
sleep 5;
done

# Start ovn-northd, ovn-nb and ovn-sb
/usr/share/ovn/scripts/ovn-ctl \
--db-nb-create-insecure-remote=yes \
Expand Down Expand Up @@ -165,17 +154,6 @@ else
ovn-sbctl --no-leader-only -p /var/run/tls/key -c /var/run/tls/cert -C /var/run/tls/cacert set-connection pssl:"${DB_SB_PORT}":[::]
ovn-sbctl --no-leader-only -p /var/run/tls/key -c /var/run/tls/cert -C /var/run/tls/cacert set Connection . inactivity_probe=180000
else
while ! nc -z "${nb_leader_ip}" "${DB_NB_PORT}" >/dev/null;
do
echo "sleep 5 seconds, waiting for ovn-nb ${nb_leader_ip}:${DB_NB_PORT} ready "
sleep 5;
done
while ! nc -z "${sb_leader_ip}" "${DB_SB_PORT}" >/dev/null;
do
echo "sleep 5 seconds, waiting for ovn-sb ${sb_leader_ip}:${DB_SB_PORT} ready "
sleep 5;
done

# Start ovn-northd, ovn-nb and ovn-sb
/usr/share/ovn/scripts/ovn-ctl \
--ovn-nb-db-ssl-key=/var/run/tls/key \
Expand Down
18 changes: 0 additions & 18 deletions dist/images/start-ovs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,6 @@ cat /proc/cmdline"
exit 1
fi

# wait for ovn-sb ready
function wait_ovn_sb {
if [[ -z "${OVN_SB_SERVICE_HOST}" ]]; then
echo "env OVN_SB_SERVICE_HOST not exists"
exit 1
fi
if [[ -z "${OVN_SB_SERVICE_PORT}" ]]; then
echo "env OVN_SB_SERVICE_PORT not exists"
exit 1
fi
while ! nc -z "${OVN_SB_SERVICE_HOST}" "${OVN_SB_SERVICE_PORT}" </dev/null;
do
echo "sleep 10 seconds, waiting for ovn-sb ${OVN_SB_SERVICE_HOST}:${OVN_SB_SERVICE_PORT} ready "
sleep 10;
done
}
wait_ovn_sb

function quit {
/usr/share/ovn/scripts/grace_stop_ovn_controller
/usr/share/openvswitch/scripts/ovs-ctl stop
Expand Down

0 comments on commit eef1b0a

Please sign in to comment.