rhel: Use ovn-ctl to ovn-controller service
authorbschanmu@redhat.com <bschanmu@redhat.com>
Tue, 8 Mar 2016 13:15:02 +0000 (18:45 +0530)
committerRussell Bryant <russell@ovn.org>
Tue, 8 Mar 2016 13:46:12 +0000 (08:46 -0500)
Trying to revert the changes caused by 8520deefbf208b24518c2bf67baad6d230f39dc0
to travis build failures

Signed-off-by: Babu Shanmugam <bschanmu@redhat.com>
Signed-off-by: Russell Bryant <russell@ovn.org>
rhel/.gitignore
rhel/automake.mk
rhel/usr_lib_systemd_system_ovn-controller.service [new file with mode: 0644]
rhel/usr_lib_systemd_system_ovn-controller.service.in [deleted file]

index 02b79b9..164bb66 100644 (file)
@@ -4,4 +4,3 @@ openvswitch-kmod-rhel6.spec
 openvswitch-kmod-fedora.spec
 openvswitch.spec
 openvswitch-fedora.spec
-usr_lib_systemd_system_ovn-controller.service
index dc53986..dc30715 100644 (file)
@@ -28,7 +28,6 @@ EXTRA_DIST += \
        rhel/usr_lib_systemd_system_openvswitch.service \
        rhel/usr_lib_systemd_system_openvswitch-nonetwork.service \
        rhel/usr_lib_systemd_system_ovn-controller.service \
-       rhel/usr_lib_systemd_system_ovn-controller.service.in \
        rhel/usr_lib_systemd_system_ovn-controller-vtep.service \
        rhel/usr_lib_systemd_system_ovn-northd.service
 
@@ -52,8 +51,6 @@ $(srcdir)/rhel/openvswitch.spec: rhel/openvswitch.spec.in $(top_builddir)/config
 $(srcdir)/rhel/openvswitch-fedora.spec: rhel/openvswitch-fedora.spec.in $(top_builddir)/config.status
        $(update_rhel_spec)
 
-$(srcdir)/rhel/usr_lib_systemd_system_ovn-controller.service: rhel/usr_lib_systemd_system_ovn-controller.service.in $(top_builddir)/config.status
-
 RPMBUILD_TOP := $(abs_top_builddir)/rpm/rpmbuild
 
 # Build user-space RPMs
diff --git a/rhel/usr_lib_systemd_system_ovn-controller.service b/rhel/usr_lib_systemd_system_ovn-controller.service
new file mode 100644 (file)
index 0000000..9bd2f66
--- /dev/null
@@ -0,0 +1,20 @@
+#
+# You may override the following variables to customize ovn-controller behavior:
+#
+#   OVS_DB - Set this variable to the location of the ovsdb server that is
+#            serving the Open_vSwitch database for the local ovs-vswitchd.
+#            See the manpage for ovn-controller for more details on the
+#            format for the db location.
+#
+
+[Unit]
+Description=OVN controller daemon
+After=syslog.target
+Requires=openvswitch.service
+After=openvswitch.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/share/openvswitch/scripts/ovn-ctl start_controller
+ExecStop=/usr/share/openvswitch/scripts/ovn-ctl stop_controller
diff --git a/rhel/usr_lib_systemd_system_ovn-controller.service.in b/rhel/usr_lib_systemd_system_ovn-controller.service.in
deleted file mode 100644 (file)
index 8373eb2..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# You may override the following variables to customize ovn-controller behavior:
-#
-#   OVS_DB - Set this variable to the location of the ovsdb server that is
-#            serving the Open_vSwitch database for the local ovs-vswitchd.
-#            See the manpage for ovn-controller for more details on the
-#            format for the db location.
-#
-
-[Unit]
-Description=OVN controller daemon
-After=syslog.target
-Requires=openvswitch.service
-After=openvswitch.service
-
-[Service]
-Type=simple
-Environment=OVS_RUNDIR=@RUNDIR@
-Environment=OVS_DB=unix:@RUNDIR@/db.sock
-ExecStart=/usr/bin/ovn-controller -vconsole:emer -vsyslog:err -vfile:info \
-          --log-file=/var/log/openvswitch/ovn-controller.log \
-          --no-chdir --pidfile=${OVS_RUNDIR}/ovn-controller.pid ${OVS_DB}