Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion assets/components/ovn/multi-node/master/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ spec:
--db-nb-cluster-local-proto=tcp \
--no-monitor"

rm -f /run/ovn/ovnnb_db.sock

echo "$(date -Iseconds) - starting nbdb"

exec /usr/share/ovn/scripts/ovn-ctl \
Expand Down Expand Up @@ -286,6 +288,8 @@ spec:
--db-sb-cluster-local-proto=tcp \
--no-monitor"

rm -f /run/ovn/ovnsb_db.sock

echo "$(date -Iseconds) - starting sbdb "
exec /usr/share/ovn/scripts/ovn-ctl \
${OVN_ARGS} \
Expand Down Expand Up @@ -376,7 +380,8 @@ spec:

echo "I$(date "+%m%d %H:%M:%S.%N") - ovnkube-master - start ovnkube --init-master ${K8S_NODE}"
exec /usr/bin/ovnkube \
--init-master "${K8S_NODE}" \
--init-cluster-manager "${K8S_NODE}" \
--init-ovnkube-controller "${K8S_NODE}" \
--nb-address "{{.OVN_NB_DB_LIST}}" \
--sb-address "{{.OVN_SB_DB_LIST}}" \
--config-file=/run/ovnkube-config/ovnkube.conf \
Expand Down
8 changes: 8 additions & 0 deletions assets/components/ovn/multi-node/node/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ spec:
# K8S_NODE_IP triggers reconcilation of this daemon when node IP changes
echo "$(date -Iseconds) - starting ovn-controller, Node: ${K8S_NODE} IP: ${K8S_NODE_IP}"

# Wait for the SBDB unix socket to appear. The sbdb container
# removes stale sockets and creates fresh ones on startup.
# Connecting to a stale socket would cause ovn-controller to
# cache a raft commit index higher than the fresh SBDB's.
echo "Waiting for SBDB socket..."
while [ ! -S /run/ovn/ovnsb_db.sock ]; do sleep 1; done
echo "SBDB socket ready"

exec ovn-controller unix:/var/run/openvswitch/db.sock -vfile:off \
--no-chdir --pidfile=/var/run/ovn/ovn-controller.pid \
--syslog-method="null" \
Expand Down
7 changes: 6 additions & 1 deletion assets/components/ovn/single-node/master/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ spec:
ovn_db_file="/etc/ovn/ovn${db}_db.db"
OVN_ARGS="--db-nb-cluster-local-port=9643 --no-monitor"

rm -f /run/ovn/ovnnb_db.sock

echo "$(date -Iseconds) - starting nbdb"
exec /usr/share/ovn/scripts/ovn-ctl \
${OVN_ARGS} \
Expand Down Expand Up @@ -251,6 +253,8 @@ spec:

OVN_ARGS="--db-sb-cluster-local-port=9644 --no-monitor"

rm -f /run/ovn/ovnsb_db.sock

echo "$(date -Iseconds) - starting sbdb "
exec /usr/share/ovn/scripts/ovn-ctl \
${OVN_ARGS} \
Expand Down Expand Up @@ -337,7 +341,8 @@ spec:

echo "I$(date "+%m%d %H:%M:%S.%N") - ovnkube-master - start ovnkube --init-master ${K8S_NODE} --init-node ${K8S_NODE}"
exec /usr/bin/ovnkube \
--init-master "${K8S_NODE}" \
--init-cluster-manager "${K8S_NODE}" \
--init-ovnkube-controller "${K8S_NODE}" \
--init-node "${K8S_NODE}" \
--allow-no-uplink \
--config-file=/run/ovnkube-config/ovnkube.conf \
Expand Down
8 changes: 8 additions & 0 deletions assets/components/ovn/single-node/node/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ spec:
# K8S_NODE_IP triggers reconcilation of this daemon when node IP changes
echo "$(date -Iseconds) - starting ovn-controller, Node: ${K8S_NODE} IP: ${K8S_NODE_IP}"

# Wait for the SBDB unix socket to appear. The sbdb container
# removes stale sockets and creates fresh ones on startup.
# Connecting to a stale socket would cause ovn-controller to
# cache a raft commit index higher than the fresh SBDB's.
echo "Waiting for SBDB socket..."
while [ ! -S /run/ovn/ovnsb_db.sock ]; do sleep 1; done
echo "SBDB socket ready"

exec ovn-controller unix:/var/run/openvswitch/db.sock -vfile:off \
--no-chdir --pidfile=/var/run/ovn/ovn-controller.pid \
--syslog-method="null" \
Expand Down