diff options
author | Russell Bryant <rbryant@redhat.com> | 2015-08-26 17:46:54 -0400 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2015-08-28 11:31:13 -0700 |
commit | ab4d55dc4aebbdb56d71ac607b99bd7727bcd889 (patch) | |
tree | a612e4331b129578835c51b2ca9bad79c70f55b4 /rhel | |
parent | 681a4a21adc464f5aa3a7943fd2125a64b6bf6e6 (diff) | |
download | openvswitch-ab4d55dc4aebbdb56d71ac607b99bd7727bcd889.tar.gz |
rhel: Add systemd suport for ovn-controller-vtep.
Signed-off-by: Russell Bryant <rbryant@redhat.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'rhel')
-rw-r--r-- | rhel/automake.mk | 1 | ||||
-rw-r--r-- | rhel/openvswitch-fedora.spec.in | 10 | ||||
-rw-r--r-- | rhel/usr_lib_systemd_system_ovn-controller-vtep.service | 12 |
3 files changed, 22 insertions, 1 deletions
diff --git a/rhel/automake.mk b/rhel/automake.mk index d26332589..e484a9347 100644 --- a/rhel/automake.mk +++ b/rhel/automake.mk @@ -28,6 +28,7 @@ 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-vtep.service \ rhel/usr_lib_systemd_system_ovn-northd.service update_rhel_spec = \ diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in index 4789704ad..695f1d7cb 100644 --- a/rhel/openvswitch-fedora.spec.in +++ b/rhel/openvswitch-fedora.spec.in @@ -116,7 +116,8 @@ install -d -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch install -p -D -m 0644 \ rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template \ $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/openvswitch -for service in openvswitch openvswitch-nonetwork ovn-controller ovn-northd; do +for service in openvswitch openvswitch-nonetwork \ + ovn-controller ovn-controller-vtep ovn-northd; do install -p -D -m 0644 \ rhel/usr_lib_systemd_system_${service}.service \ $RPM_BUILD_ROOT%{_unitdir}/${service}.service @@ -173,12 +174,15 @@ rm -rf $RPM_BUILD_ROOT %preun ovn %if 0%{?systemd_preun:1} %systemd_preun ovn-controller.service + %systemd_preun ovn-controller-vtep.service %systemd_preun ovn-northd.service %else if [ $1 -eq 0 ] ; then # Package removal, not upgrade /bin/systemctl --no-reload disable ovn-controller.service >/dev/null 2>&1 || : /bin/systemctl stop ovn-controller.service >/dev/null 2>&1 || : + /bin/systemctl --no-reload disable ovn-controller-vtep.service >/dev/null 2>&1 || : + /bin/systemctl stop ovn-controller-vtep.service >/dev/null 2>&1 || : /bin/systemctl --no-reload disable ovn-northd.service >/dev/null 2>&1 || : /bin/systemctl stop ovn-northd.service >/dev/null 2>&1 || : fi @@ -197,6 +201,7 @@ rm -rf $RPM_BUILD_ROOT %post ovn %if 0%{?systemd_post:1} %systemd_post ovn-controller.service + %systemd_post ovn-controller-vtep.service %systemd_post ovn-northd.service %else # Package install, not upgrade @@ -219,12 +224,14 @@ rm -rf $RPM_BUILD_ROOT %postun ovn %if 0%{?systemd_postun_with_restart:1} %systemd_postun_with_restart ovn-controller.service + %systemd_postun_with_restart ovn-controller-vtep.service %systemd_postun_with_restart ovn-northd.service %else /bin/systemctl daemon-reload >/dev/null 2>&1 || : if [ "$1" -ge "1" ] ; then # Package upgrade, not uninstall /bin/systemctl try-restart ovn-controller.service >/dev/null 2>&1 || : + /bin/systemctl try-restart ovn-controller-vtep.service >/dev/null 2>&1 || : /bin/systemctl try-restart ovn-northd.service >/dev/null 2>&1 || : fi %endif @@ -341,6 +348,7 @@ rm -rf $RPM_BUILD_ROOT %config %{_datadir}/openvswitch/ovn-nb.ovsschema %config %{_datadir}/openvswitch/ovn-sb.ovsschema %{_unitdir}/ovn-controller.service +%{_unitdir}/ovn-controller-vtep.service %{_unitdir}/ovn-northd.service %changelog diff --git a/rhel/usr_lib_systemd_system_ovn-controller-vtep.service b/rhel/usr_lib_systemd_system_ovn-controller-vtep.service new file mode 100644 index 000000000..f8ec238cf --- /dev/null +++ b/rhel/usr_lib_systemd_system_ovn-controller-vtep.service @@ -0,0 +1,12 @@ +[Unit] +Description=OVN VTEP gateway controller daemon +After=syslog.target +Requires=openvswitch.service +After=openvswitch.service + +[Service] +Type=simple +Environment=OVS_RUNDIR=%t/openvswitch +ExecStart=/usr/bin/ovn-controller-vtep -vconsole:emer -vsyslog:err -vfile:info \ + --log-file=/var/log/openvswitch/ovn-controller-vtep.log \ + --no-chdir --pidfile=${OVS_RUNDIR}/ovn-controller-vtep.pid |