Having a separate debian package for deploying the ovn-controller-vtep binary enables the ability to assign specific nodes the role of communicating with VTEP enabled TORs.
Change-Id: Ia36aea7d89bd011a57918820b2a9f6e3469b3e04 Signed-off-by: Ryan Moats <rmo...@us.ibm.com> --- debian/automake.mk | 5 +++- debian/control | 15 +++++++++++ debian/ovn-controller-vtep.init | 53 +++++++++++++++++++++++++++++++++++++ debian/ovn-controller-vtep.install | 1 + debian/ovn-controller-vtep.manpages | 1 + ovn/utilities/ovn-ctl | 51 ++++++++++++++++++++++++++++------- ovn/utilities/ovn-ctl.8.xml | 3 +++ 7 files changed, 119 insertions(+), 10 deletions(-) create mode 100755 debian/ovn-controller-vtep.init create mode 100644 debian/ovn-controller-vtep.install create mode 100644 debian/ovn-controller-vtep.manpages diff --git a/debian/automake.mk b/debian/automake.mk index 7b5b3aa..73b4d00 100644 --- a/debian/automake.mk +++ b/debian/automake.mk @@ -58,9 +58,12 @@ EXTRA_DIST += \ debian/ovn-central.postinst \ debian/ovn-central.postrm \ debian/ovn-central.template \ + debian/ovn-controller-vtep.init \ + debian/ovn-controller-vtep.install \ + debian/ovn-controller-vtep.manpages \ debian/ovn-common.install \ debian/ovn-common.manpages \ - debian/ovn-docker.install \ + debian/ovn-docker.install \ debian/ovn-host.dirs \ debian/ovn-host.init \ debian/ovn-host.install \ diff --git a/debian/control b/debian/control index 9ba6e6b..480ff5c 100644 --- a/debian/control +++ b/debian/control @@ -113,6 +113,21 @@ Description: OVN common components . ovn-common provides components required by other OVN packages. +Package: ovn-controller-vtep +Architecture: linux-any +Depends: ovn-common (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends} +Description: OVN vtep controller + ovn-controller-vtep is the local controller daemon in + OVN, the Open Virtual Network, for VTEP enabled physical switches. + It connects up to the OVN Southbound database over the OVSDB protocol, + and down to the VTEP database over the OVSDB protocol. + . + ovn-controller-vtep provides the ovn-controller-vtep binary for controlling + vtep gateways. + + Package: ovn-host Architecture: linux-any Depends: openvswitch-switch (= ${binary:Version}), diff --git a/debian/ovn-controller-vtep.init b/debian/ovn-controller-vtep.init new file mode 100755 index 0000000..acba329 --- /dev/null +++ b/debian/ovn-controller-vtep.init @@ -0,0 +1,53 @@ +#! /bin/sh +# +### BEGIN INIT INFO +# Provides: ovn-controller-vtep +# Required-Start: openvswitch-switch $remote_fs $syslog +# Required-Stop: $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: OVN Controller for VTEP enabled devices +# Description: ovn-controller-vtep provides the userspace +# components and utilities for OVN that can be run on +# hosts taht connect to VTEP enabled devices. +### END INIT INFO + +test -x /usr/bin/ovn-controller-vtep || exit 0 +test -x /usr/share/openvswitch/scripts/ovn-ctl || exit 0 + +_SYSTEMCTL_SKIP_REDIRECT=yes + +. /usr/share/openvswitch/scripts/ovs-lib +if [ -e /etc/default/ovn-controller-vtep ]; then + . /etc/default/ovn-controller-vtep +fi + +start () { + set /usr/share/openvswitch/scripts/ovn-ctl ${1-start_controller_vtep} + set "$@" $OVN_CTL_OPTS + "$@" || exit $? +} + +case $1 in + start) + start + ;; + stop | force-stop) + /usr/share/openvswitch/scripts/ovn-ctl stop_controller_vtep + ;; + restart) + start restart_controller_vtep + ;; + status) + /usr/share/openvswitch/scripts/ovn-ctl status_controller_vtep + exit $? + ;; + reload | force-reload) + ;; + *) + echo "Usage: $0 {start|stop|reload|force-reload|restart|status}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/debian/ovn-controller-vtep.install b/debian/ovn-controller-vtep.install new file mode 100644 index 0000000..1d208f3 --- /dev/null +++ b/debian/ovn-controller-vtep.install @@ -0,0 +1 @@ +usr/bin/ovn-controller-vtep diff --git a/debian/ovn-controller-vtep.manpages b/debian/ovn-controller-vtep.manpages new file mode 100644 index 0000000..7873017 --- /dev/null +++ b/debian/ovn-controller-vtep.manpages @@ -0,0 +1 @@ +ovn/controller-vtep/ovn-controller-vtep.8 diff --git a/ovn/utilities/ovn-ctl b/ovn/utilities/ovn-ctl index dad6db6..a4a9817 100755 --- a/ovn/utilities/ovn-ctl +++ b/ovn/utilities/ovn-ctl @@ -114,6 +114,12 @@ start_controller () { OVS_RUNDIR=${OVN_RUNDIR} start_daemon "$OVN_CONTROLLER_PRIORITY" "$OVN_CONTROLLER_WRAPPER" "$@" } +start_controller_vtep () { + set ovn-controller-vtep "unix:$DB_SOCK" + set "$@" -vconsole:emer -vsyslog:err -vfile:info + OVS_RUNDIR=${OVN_RUNDIR} start_daemon "$OVN_CONTROLLER_PRIORITY" "$OVN_CONTROLLER_WRAPPER" "$@" +} + ## ---- ## ## stop ## ## ---- ## @@ -130,6 +136,10 @@ stop_controller () { OVS_RUNDIR=${OVN_RUNDIR} stop_daemon ovn-controller } +stop_controller_vtep () { + OVS_RUNDIR=${OVN_RUNDIR} stop_daemon ovn-controller-vtep +} + ## ------- ## ## restart ## ## ------- ## @@ -144,6 +154,11 @@ restart_controller () { start_controller } +restart_controller_vtep () { + stop_controller_vtep + start_controller_vtep +} + restart_ovsdb () { stop_ovsdb start_ovsdb @@ -214,15 +229,18 @@ This program is intended to be invoked internally by Open Virtual Network startup scripts. System administrators should not normally invoke it directly. Commands: - start_northd start ovn-northd - start_ovsdb start ovn related ovsdb-server processes - start_controller start ovn-controller - stop_northd stop ovn-northd - stop_ovsdb stop ovn related ovsdb-server processes - stop_controller stop ovn-controller - restart_northd restart ovn-northd - restart_ovsdb restart ovn related ovsdb-server processes - restart_controller restart ovn-controller + start_northd start ovn-northd + start_ovsdb start ovn related ovsdb-server processes + start_controller start ovn-controller + start_controller_vtep start ovn-controller-vtep + stop_northd stop ovn-northd + stop_ovsdb stop ovn related ovsdb-server processes + stop_controller stop ovn-controller + stop_controller_vtep stop ovn-controller-vtep + restart_northd restart ovn-northd + restart_ovsdb restart ovn related ovsdb-server processes + restart_controller restart ovn-controller + restart_controller_vtep restart ovn-controller-vtep Options: --ovn-northd-priority=NICE set ovn-northd's niceness (default: $OVN_NORTHD_PRIORITY) @@ -317,6 +335,9 @@ case $command in start_controller) start_controller ;; + start_controller_vtep) + start_controller_vtep + ;; stop_northd) stop_northd ;; @@ -326,6 +347,12 @@ case $command in stop_controller) stop_controller ;; + stop_controller) + stop_controller + ;; + stop_controller_vtep) + stop_controller_vtep + ;; restart_northd) restart_northd ;; @@ -335,6 +362,9 @@ case $command in restart_controller) restart_controller ;; + restart_controller_vtep) + restart_controller_vtep + ;; status_northd) daemon_status ovn-northd || exit 1 ;; @@ -344,6 +374,9 @@ case $command in status_controller) daemon_status ovn-controller || exit 1 ;; + status_controller_vtep) + daemon_status ovn-controller-vtep || exit 1 + ;; help) usage ;; diff --git a/ovn/utilities/ovn-ctl.8.xml b/ovn/utilities/ovn-ctl.8.xml index 89ad934..b0127da 100644 --- a/ovn/utilities/ovn-ctl.8.xml +++ b/ovn/utilities/ovn-ctl.8.xml @@ -15,10 +15,13 @@ <dl> <dt><code>start_northd</code></dt> <dt><code>start_controller</code></dt> + <dt><code>start_controller_vtep</code></dt> <dt><code>stop_northd</code></dt> <dt><code>stop_controller</code></dt> + <dt><code>stop_controller_vtep</code></dt> <dt><code>restart_northd</code></dt> <dt><code>restart_controller</code></dt> + <dt><code>restart_controller_vtep</code></dt> </dl> <h1>Options</h1> -- 1.9.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev