Skip to content

Commit

Permalink
Remove support for ovn2.11
Browse files Browse the repository at this point in the history
Completes the switch from ovn2.11 to ovn2.12 by removing support for the
now obsolete ovn2.11

SDN-643
https://issues.redhat.com/browse/SDN-643

Signed-off-by: Phil Cameron <pcameron@redhat.com>
  • Loading branch information
pecameron committed Mar 3, 2020
1 parent 161c3d7 commit f479a53
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 53 deletions.
50 changes: 6 additions & 44 deletions bindata/network/ovn-kubernetes/ovnkube-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,20 +113,11 @@ spec:
set +o allexport
fi
# Determine the ovn rundir.
if [[ -f /usr/bin/ovn-appctl ]] ; then
# ovn-appctl is present. Use new ovn run dir path.
OVNCTL_PATH=/usr/share/ovn/scripts/ovn-ctl
else
# ovn-appctl is not present. Use openvswitch run dir path.
OVNCTL_PATH=/usr/share/openvswitch/scripts/ovn-ctl
fi
bracketify() { case "$1" in *:*) echo "[$1]" ;; *) echo "$1" ;; esac }
MASTER_IP="{{.OVN_MASTER_IP}}"
if [[ "${K8S_NODE_IP}" == "${MASTER_IP}" ]]; then
exec ${OVNCTL_PATH} \
exec /usr/share/ovn/scripts/ovn-ctl \
--db-nb-cluster-local-port={{.OVN_NB_RAFT_PORT}} \
--db-nb-cluster-local-addr=$(bracketify ${K8S_NODE_IP}) \
--no-monitor \
Expand All @@ -137,7 +128,7 @@ spec:
--ovn-nb-log="-vconsole:${OVN_LOG_LEVEL} -vfile:off" \
run_nb_ovsdb
else
exec ${OVNCTL_PATH} \
exec /usr/share/ovn/scripts/ovn-ctl \
--db-nb-cluster-local-port={{.OVN_NB_RAFT_PORT}} \
--db-nb-cluster-remote-port={{.OVN_NB_RAFT_PORT}} \
--db-nb-cluster-local-addr=$(bracketify ${K8S_NODE_IP}) \
Expand Down Expand Up @@ -178,17 +169,7 @@ spec:
- -c
- |
set -xe
# Determine the ovn rundir.
if [[ -f /usr/bin/ovn-appctl ]] ; then
# ovn-appctl is present. Use new ovn run dir path.
DB_SOCK_PATH=/var/run/ovn/ovnnb_db.ctl
APPCTL_PATH=/usr/bin/ovn-appctl
else
# ovn-appctl is not present. Use openvswitch run dir path.
DB_SOCK_PATH=/var/run/openvswitch/ovnnb_db.ctl
APPCTL_PATH=/usr/bin/ovs-appctl
fi
exec ${APPCTL_PATH} -t ${DB_SOCK_PATH} cluster/status OVN_Northbound 2>/dev/null | grep ${K8S_NODE_IP} | grep -v Address -q
exec /usr/bin/ovn-appctl -t /var/run/ovn/ovnnb_db.ctl cluster/status OVN_Northbound 2>/dev/null | grep ${K8S_NODE_IP} | grep -v Address -q
env:
- name: OVN_LOG_LEVEL
value: info
Expand Down Expand Up @@ -238,20 +219,11 @@ spec:
set +o allexport
fi
# Determine the ovn rundir.
if [[ -f /usr/bin/ovn-appctl ]] ; then
# ovn-appctl is present. Use new ovn run dir path.
OVNCTL_PATH=/usr/share/ovn/scripts/ovn-ctl
else
# ovn-appctl is not present. Use openvswitch run dir path.
OVNCTL_PATH=/usr/share/openvswitch/scripts/ovn-ctl
fi
bracketify() { case "$1" in *:*) echo "[$1]" ;; *) echo "$1" ;; esac }
MASTER_IP="{{.OVN_MASTER_IP}}"
if [[ "${K8S_NODE_IP}" == "${MASTER_IP}" ]]; then
exec ${OVNCTL_PATH} \
exec /usr/share/ovn/scripts/ovn-ctl \
--db-sb-cluster-local-port={{.OVN_SB_RAFT_PORT}} \
--db-sb-cluster-local-addr=$(bracketify ${K8S_NODE_IP}) \
--no-monitor \
Expand All @@ -263,7 +235,7 @@ spec:
run_sb_ovsdb
else
echo "joining cluster at ${MASTER_IP}"
exec ${OVNCTL_PATH} \
exec /usr/share/ovn/scripts/ovn-ctl \
--db-sb-cluster-local-port={{.OVN_SB_RAFT_PORT}} \
--db-sb-cluster-remote-port={{.OVN_SB_RAFT_PORT}} \
--db-sb-cluster-local-addr=$(bracketify ${K8S_NODE_IP}) \
Expand Down Expand Up @@ -304,17 +276,7 @@ spec:
- -c
- |
set -xe
# Determine the ovn rundir.
if [[ -f /usr/bin/ovn-appctl ]] ; then
# ovn-appctl is present. Use new ovn run dir path.
DB_SOCK_PATH=/var/run/ovn/ovnsb_db.ctl
APPCTL_PATH=/usr/bin/ovn-appctl
else
# ovn-appctl is not present. Use openvswitch run dir path.
DB_SOCK_PATH=/var/run/openvswitch/ovnsb_db.ctl
APPCTL_PATH=/usr/bin/ovs-appctl
fi
exec ${APPCTL_PATH} -t ${DB_SOCK_PATH} cluster/status OVN_Southbound 2>/dev/null | grep ${K8S_NODE_IP} | grep -v Address -q
exec /usr/bin/ovn-appctl -t /var/run/ovn/ovnsb_db.ctl cluster/status OVN_Southbound 2>/dev/null | grep ${K8S_NODE_IP} | grep -v Address -q
env:
- name: OVN_LOG_LEVEL
value: info
Expand Down
10 changes: 1 addition & 9 deletions bindata/network/ovn-kubernetes/ovnkube-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,8 @@ spec:
source "/env/${K8S_NODE}"
set +o allexport
fi
# Determine the ovn rundir.
if [[ -f /usr/bin/ovn-appctl ]] ; then
# ovn-appctl is present. Use new ovn run dir path.
OVNCTL_DIR=ovn
else
# ovn-appctl is not present. Use openvswitch run dir path.
OVNCTL_DIR=openvswitch
fi
exec ovn-controller unix:/var/run/openvswitch/db.sock -vfile:off \
--no-chdir --pidfile=/var/run/${OVNCTL_DIR}/ovn-controller.pid \
--no-chdir --pidfile=/var/run/ovn/ovn-controller.pid \
-p /ovn-cert/tls.key -c /ovn-cert/tls.crt -C /ovn-ca/ca-bundle.crt \
-vconsole:"${OVN_LOG_LEVEL}"
securityContext:
Expand Down

0 comments on commit f479a53

Please sign in to comment.