Future patch will make ovn-northd.server start and stop northd only. Rename the current service as central service to be more consistent with the package name.
Signed-off-by: Andy Zhou <[email protected]> --- rhel/automake.mk | 2 +- rhel/openvswitch-fedora.spec.in | 16 ++++++------- rhel/usr_lib_systemd_system_ovn-central.service | 31 +++++++++++++++++++++++++ rhel/usr_lib_systemd_system_ovn-northd.service | 31 ------------------------- 4 files changed, 40 insertions(+), 40 deletions(-) create mode 100644 rhel/usr_lib_systemd_system_ovn-central.service delete mode 100644 rhel/usr_lib_systemd_system_ovn-northd.service diff --git a/rhel/automake.mk b/rhel/automake.mk index 45aa9b1..8e0efa5 100644 --- a/rhel/automake.mk +++ b/rhel/automake.mk @@ -30,7 +30,7 @@ EXTRA_DIST += \ rhel/usr_lib_systemd_system_ovs-vswitchd.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 + rhel/usr_lib_systemd_system_ovn-central.service update_rhel_spec = \ $(AM_V_GEN)($(ro_shell) && sed -e 's,[@]VERSION[@],$(VERSION),g') \ diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in index 9517b7a..addeeb8 100644 --- a/rhel/openvswitch-fedora.spec.in +++ b/rhel/openvswitch-fedora.spec.in @@ -207,7 +207,7 @@ install -p -D -m 0644 \ rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template \ $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/openvswitch for service in openvswitch ovsdb-server ovs-vswitchd \ - ovn-controller ovn-controller-vtep ovn-northd; do + ovn-controller ovn-controller-vtep ovn-central; do install -p -D -m 0644 \ rhel/usr_lib_systemd_system_${service}.service \ $RPM_BUILD_ROOT%{_unitdir}/${service}.service @@ -278,12 +278,12 @@ rm -rf $RPM_BUILD_ROOT %preun ovn-central %if 0%{?systemd_preun:1} - %systemd_preun ovn-northd.service + %systemd_preun ovn-central.service %else if [ $1 -eq 0 ] ; then # Package removal, not upgrade - /bin/systemctl --no-reload disable ovn-northd.service >/dev/null 2>&1 || : - /bin/systemctl stop ovn-northd.service >/dev/null 2>&1 || : + /bin/systemctl --no-reload disable ovn-central.service >/dev/null 2>&1 || : + /bin/systemctl stop ovn-central.service >/dev/null 2>&1 || : fi %endif @@ -325,7 +325,7 @@ ln -sf %{_datadir}/openvswitch/scripts/ovndb-servers.ocf /usr/lib/ocf/resource.d %post ovn-central %if 0%{?systemd_post:1} - %systemd_post ovn-northd.service + %systemd_post ovn-central.service %else # Package install, not upgrade if [ $1 -eq 1 ]; then @@ -368,12 +368,12 @@ rm -rf /usr/lib/ocf/resource.d/ovn %postun ovn-central %if 0%{?systemd_postun_with_restart:1} - %systemd_postun_with_restart ovn-northd.service + %systemd_postun_with_restart ovn-central.service %else /bin/systemctl daemon-reload >/dev/null 2>&1 || : if [ "$1" -ge "1" ] ; then # Package upgrade, not uninstall - /bin/systemctl try-restart ovn-northd.service >/dev/null 2>&1 || : + /bin/systemctl try-restart ovn-central.service >/dev/null 2>&1 || : fi %endif @@ -534,7 +534,7 @@ fi %{_mandir}/man8/ovn-northd.8* %config %{_datadir}/openvswitch/ovn-nb.ovsschema %config %{_datadir}/openvswitch/ovn-sb.ovsschema -%{_unitdir}/ovn-northd.service +%{_unitdir}/ovn-central.service %files ovn-host %{_bindir}/ovn-controller diff --git a/rhel/usr_lib_systemd_system_ovn-central.service b/rhel/usr_lib_systemd_system_ovn-central.service new file mode 100644 index 0000000..b94c1e0 --- /dev/null +++ b/rhel/usr_lib_systemd_system_ovn-central.service @@ -0,0 +1,31 @@ +# See ovn-northd(8) for details about ovn-northd. +# +# To customize the ovn-northd service, you may create a configuration file +# in the /etc/systemd/system/ovn-northd.d/ directory. For example, to specify +# additional options to be passed to the "ovn-ctl start_northd" command, you +# could place the following contents in +# /etc/systemd/system/ovn-northd.d/local.conf: +# +# [System] +# Environment="OVN_NORTHD_OPTS=--db-nb-sock=/usr/local/var/run/openvswitch/ovnnb_db.sock --db-sb-sock=/usr/local/var/run/openvswitch/ovnsb_db.sock" +# +# Alternatively, you may specify environment variables in the file /etc/sysconfig/ovn-northd: +# +# OVN_NORTHD_OPTS="--db-nb-sock=/usr/local/var/run/openvswitch/ovnnb_db.sock --db-sb-sock=/usr/local/var/run/openvswitch/ovnsb_db.sock" + +[Unit] +Description=OVN central management daemons +After=syslog.target +Requires=openvswitch.service +After=openvswitch.service + +[Service] +Type=oneshot +RemainAfterExit=yes +Environment=OVS_RUNDIR=%t/openvswitch OVS_DBDIR=/var/lib/openvswitch +EnvironmentFile=-/etc/sysconfig/ovn-northd +ExecStart=/usr/share/openvswitch/scripts/ovn-ctl start_northd $OVN_NORTHD_OPTS +ExecStop=/usr/share/openvswitch/scripts/ovn-ctl stop_northd + +[Install] +WantedBy=multi-user.target diff --git a/rhel/usr_lib_systemd_system_ovn-northd.service b/rhel/usr_lib_systemd_system_ovn-northd.service deleted file mode 100644 index 3c44600..0000000 --- a/rhel/usr_lib_systemd_system_ovn-northd.service +++ /dev/null @@ -1,31 +0,0 @@ -# See ovn-northd(8) for details about ovn-northd. -# -# To customize the ovn-northd service, you may create a configuration file -# in the /etc/systemd/system/ovn-northd.d/ directory. For example, to specify -# additional options to be passed to the "ovn-ctl start_northd" command, you -# could place the following contents in -# /etc/systemd/system/ovn-northd.d/local.conf: -# -# [System] -# Environment="OVN_NORTHD_OPTS=--db-nb-sock=/usr/local/var/run/openvswitch/ovnnb_db.sock --db-sb-sock=/usr/local/var/run/openvswitch/ovnsb_db.sock" -# -# Alternatively, you may specify environment variables in the file /etc/sysconfig/ovn-northd: -# -# OVN_NORTHD_OPTS="--db-nb-sock=/usr/local/var/run/openvswitch/ovnnb_db.sock --db-sb-sock=/usr/local/var/run/openvswitch/ovnsb_db.sock" - -[Unit] -Description=OVN northd management daemon -After=syslog.target -Requires=openvswitch.service -After=openvswitch.service - -[Service] -Type=oneshot -RemainAfterExit=yes -Environment=OVS_RUNDIR=%t/openvswitch OVS_DBDIR=/var/lib/openvswitch -EnvironmentFile=-/etc/sysconfig/ovn-northd -ExecStart=/usr/share/openvswitch/scripts/ovn-ctl start_northd $OVN_NORTHD_OPTS -ExecStop=/usr/share/openvswitch/scripts/ovn-ctl stop_northd - -[Install] -WantedBy=multi-user.target -- 1.8.3.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
