rhel: Use same rundir for ovs and ovn.
authorRussell Bryant <rbryant@redhat.com>
Wed, 26 Aug 2015 21:46:53 +0000 (17:46 -0400)
committerBen Pfaff <blp@nicira.com>
Fri, 28 Aug 2015 18:31:13 +0000 (11:31 -0700)
The previous systemd units for OVN had systemd create a rundir for
each daemon (ovn-northd and ovn-controller).  This "worked", in that
the services did start successfully.  However, they didn't actually
work.  In practice, both services make use of files in the main ovs
rundir, so just run everything from there.  It keeps things simple and
makes the services actually work.

Signed-off-by: Russell Bryant <rbryant@redhat.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
rhel/openvswitch-fedora.spec.in
rhel/usr_lib_systemd_system_ovn-controller.service
rhel/usr_lib_systemd_system_ovn-northd.service

index 4d403e0..4789704 100644 (file)
@@ -342,8 +342,6 @@ rm -rf $RPM_BUILD_ROOT
 %config %{_datadir}/openvswitch/ovn-sb.ovsschema
 %{_unitdir}/ovn-controller.service
 %{_unitdir}/ovn-northd.service
-%ghost %attr(755,root,root) %{_rundir}/ovn-controller
-%ghost %attr(755,root,root) %{_rundir}/ovn-northd
 
 %changelog
 * Wed Jan 12 2011 Ralf Spenneberg <ralf@os-s.net>
index 4fdcfd2..7637fe7 100644 (file)
@@ -6,11 +6,8 @@ After=openvswitch.service
 
 [Service]
 Type=simple
-RuntimeDirectory=ovn-controller
-RuntimeDirectoryMode=0755
-PIDFile=%t/ovn-controller/ovn-controller.pid
-Environment=OVS_RUNDIR=%t/ovn-controller
+Environment=OVS_RUNDIR=%t/openvswitch
 ExecStart=/usr/bin/ovn-controller -vconsole:emer -vsyslog:err -vfile:info \
           --log-file=/var/log/openvswitch/ovn-controller.log \
-          --no-chdir --pidfile=%t/ovn-controller/ovn-controller.pid \
-          unix:/var/run/openvswitch/db.sock
+          --no-chdir --pidfile=${OVS_RUNDIR}/ovn-controller.pid \
+          unix:${OVS_RUNDIR}/db.sock
index fcbf646..5b3b03a 100644 (file)
@@ -7,9 +7,6 @@ After=openvswitch.service
 [Service]
 Type=oneshot
 RemainAfterExit=yes
-RuntimeDirectory=ovn-northd
-RuntimeDirectoryMode=0755
-PIDFile=%t/ovn-northd/ovn-northd.pid
-Environment=OVN_RUNDIR=%t/ovn-northd OVS_RUNDIR=%t/openvswitch OVS_DBDIR=/var/lib/openvswitch
+Environment=OVS_RUNDIR=%t/openvswitch OVS_DBDIR=/var/lib/openvswitch
 ExecStart=/usr/share/openvswitch/scripts/ovn-ctl start_northd
 ExecStop=/usr/share/openvswitch/scripts/ovn-ctl stop_northd