Signed-off-by: Russell Bryant <[email protected]>
---
rhel/automake.mk | 1 +
rhel/openvswitch-fedora.spec.in | 10 +++++++++-
rhel/usr_lib_systemd_system_ovn-controller-vtep.service | 12 ++++++++++++
3 files changed, 22 insertions(+), 1 deletion(-)
create mode 100644 rhel/usr_lib_systemd_system_ovn-controller-vtep.service
diff --git a/rhel/automake.mk b/rhel/automake.mk
index d263325..e484a93 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 4789704..695f1d7 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 0000000..f8ec238
--- /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
--
2.4.3
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev