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>
%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>
[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
[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