Re: [ovs-dev] [PATCH v2] ovn: Add ovn-controller-vtep debian package

2016-07-28 Thread Ben Pfaff
On Thu, Jul 28, 2016 at 04:53:03PM +, Ryan Moats wrote:
> 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 

Thanks, applied.
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


[ovs-dev] [PATCH v2] ovn: Add ovn-controller-vtep debian package

2016-07-28 Thread Ryan Moats
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 
---
 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 000..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 000..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 000..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