From: Russell Bryant Date: Wed, 26 Aug 2015 21:46:53 +0000 (-0400) Subject: rhel: Use same rundir for ovs and ovn. X-Git-Tag: v2.5.0~667 X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=681a4a21adc464f5aa3a7943fd2125a64b6bf6e6;hp=4fe04a7e6ded9ec24b7379f6227d15d3ff4f577f;p=cascardo%2Fovs.git rhel: Use same rundir for ovs and ovn. 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 Acked-by: Flavio Leitner Signed-off-by: Ben Pfaff --- diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in index 4d403e075..4789704ad 100644 --- a/rhel/openvswitch-fedora.spec.in +++ b/rhel/openvswitch-fedora.spec.in @@ -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 diff --git a/rhel/usr_lib_systemd_system_ovn-controller.service b/rhel/usr_lib_systemd_system_ovn-controller.service index 4fdcfd22c..7637fe787 100644 --- a/rhel/usr_lib_systemd_system_ovn-controller.service +++ b/rhel/usr_lib_systemd_system_ovn-controller.service @@ -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 diff --git a/rhel/usr_lib_systemd_system_ovn-northd.service b/rhel/usr_lib_systemd_system_ovn-northd.service index fcbf6462f..5b3b03aef 100644 --- a/rhel/usr_lib_systemd_system_ovn-northd.service +++ b/rhel/usr_lib_systemd_system_ovn-northd.service @@ -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