Currently, openvswitch.service calls out to start
openvswitch-nonetwork.service.  However, openvswitch-nonetwork.service
will be called ovsdb-server, so that it is a bit more reflective of
the dependencies.  This commit does make the file a bit of a misnomer as
currently the ovsdb-server SERVICE will start the ovs-vswitchd service
as well.  A future commit will clean this up, and change the ifup
configuration in the process.

Signed-off-by: Aaron Conole <acon...@redhat.com>
Acked-by: Flavio Leitner <f...@redhat.com>
---
 rhel/automake.mk                                          |  2 +-
 rhel/etc_sysconfig_network-scripts_ifdown-ovs             |  6 +++---
 rhel/etc_sysconfig_network-scripts_ifup-ovs               |  6 +++---
 rhel/openvswitch-fedora.spec.in                           |  4 ++--
 rhel/usr_lib_systemd_system_openvswitch-nonetwork.service | 15 ---------------
 rhel/usr_lib_systemd_system_openvswitch.service           |  4 ++--
 rhel/usr_lib_systemd_system_ovsdb-server.service          | 15 +++++++++++++++
 7 files changed, 26 insertions(+), 26 deletions(-)
 delete mode 100644 rhel/usr_lib_systemd_system_openvswitch-nonetwork.service
 create mode 100644 rhel/usr_lib_systemd_system_ovsdb-server.service

diff --git a/rhel/automake.mk b/rhel/automake.mk
index dc30715..7907a87 100644
--- a/rhel/automake.mk
+++ b/rhel/automake.mk
@@ -26,7 +26,7 @@ EXTRA_DIST += \
        rhel/usr_share_openvswitch_scripts_sysconfig.template \
        rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template \
        rhel/usr_lib_systemd_system_openvswitch.service \
-       rhel/usr_lib_systemd_system_openvswitch-nonetwork.service \
+       rhel/usr_lib_systemd_system_ovsdb-server.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
diff --git a/rhel/etc_sysconfig_network-scripts_ifdown-ovs 
b/rhel/etc_sysconfig_network-scripts_ifdown-ovs
index 46b6ca5..dd98d23 100755
--- a/rhel/etc_sysconfig_network-scripts_ifdown-ovs
+++ b/rhel/etc_sysconfig_network-scripts_ifdown-ovs
@@ -34,10 +34,10 @@ if [ ! -x ${OTHERSCRIPT} ]; then
     OTHERSCRIPT="/etc/sysconfig/network-scripts/ifdown-eth"
 fi
 
-SERVICE_UNIT=/usr/lib/systemd/system/openvswitch-nonetwork.service
+SERVICE_UNIT=/usr/lib/systemd/system/ovsdb-server.service
 if [ -f $SERVICE_UNIT ] && [ -x /usr/bin/systemctl ]; then
-       if ! systemctl --quiet is-active openvswitch-nonetwork.service; then
-               systemctl start openvswitch-nonetwork.service
+       if ! systemctl --quiet is-active ovsdb-server.service; then
+               systemctl start ovsdb-server.service
        fi
 else
        if [ ! -f /var/lock/subsys/openvswitch ]; then
diff --git a/rhel/etc_sysconfig_network-scripts_ifup-ovs 
b/rhel/etc_sysconfig_network-scripts_ifup-ovs
index f3fc05e..eb58c3a 100755
--- a/rhel/etc_sysconfig_network-scripts_ifup-ovs
+++ b/rhel/etc_sysconfig_network-scripts_ifup-ovs
@@ -60,10 +60,10 @@ fi
        fi
 done
 
-SERVICE_UNIT=/usr/lib/systemd/system/openvswitch-nonetwork.service
+SERVICE_UNIT=/usr/lib/systemd/system/ovsdb-server.service
 if [ -f $SERVICE_UNIT ] && [ -x /usr/bin/systemctl ]; then
-       if ! systemctl --quiet is-active openvswitch-nonetwork.service; then
-               systemctl start openvswitch-nonetwork.service
+       if ! systemctl --quiet is-active ovsdb-server.service; then
+               systemctl start ovsdb-server.service
        fi
 else
        if [ ! -f /var/lock/subsys/openvswitch ]; then
diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in
index 088afcb..253d5bc 100644
--- a/rhel/openvswitch-fedora.spec.in
+++ b/rhel/openvswitch-fedora.spec.in
@@ -189,7 +189,7 @@ 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 \
+for service in openvswitch ovsdb-server \
                ovn-controller ovn-controller-vtep ovn-northd; do
        install -p -D -m 0644 \
                        rhel/usr_lib_systemd_system_${service}.service \
@@ -416,7 +416,7 @@ fi
 %config(noreplace) %{_sysconfdir}/sysconfig/openvswitch
 %config(noreplace) %{_sysconfdir}/logrotate.d/openvswitch
 %{_unitdir}/openvswitch.service
-%{_unitdir}/openvswitch-nonetwork.service
+%{_unitdir}/ovsdb-server.service
 %{_datadir}/openvswitch/scripts/openvswitch.init
 %{_sysconfdir}/sysconfig/network-scripts/ifup-ovs
 %{_sysconfdir}/sysconfig/network-scripts/ifdown-ovs
diff --git a/rhel/usr_lib_systemd_system_openvswitch-nonetwork.service 
b/rhel/usr_lib_systemd_system_openvswitch-nonetwork.service
deleted file mode 100644
index e4c2a66..0000000
--- a/rhel/usr_lib_systemd_system_openvswitch-nonetwork.service
+++ /dev/null
@@ -1,15 +0,0 @@
-[Unit]
-Description=Open vSwitch Internal Unit
-After=syslog.target
-PartOf=openvswitch.service
-Wants=openvswitch.service
-
-[Service]
-Type=oneshot
-RemainAfterExit=yes
-EnvironmentFile=-/etc/sysconfig/openvswitch
-ExecStart=/usr/share/openvswitch/scripts/ovs-ctl start \
-          --system-id=random $OPTIONS
-ExecStop=/usr/share/openvswitch/scripts/ovs-ctl stop
-RuntimeDirectory=openvswitch
-RuntimeDirectoryMode=0755
diff --git a/rhel/usr_lib_systemd_system_openvswitch.service 
b/rhel/usr_lib_systemd_system_openvswitch.service
index f0bc16f..96c697b 100644
--- a/rhel/usr_lib_systemd_system_openvswitch.service
+++ b/rhel/usr_lib_systemd_system_openvswitch.service
@@ -1,7 +1,7 @@
 [Unit]
 Description=Open vSwitch
-After=syslog.target network.target openvswitch-nonetwork.service
-Requires=openvswitch-nonetwork.service
+After=syslog.target network.target ovsdb-server.service
+Requires=ovsdb-server.service
 
 [Service]
 Type=oneshot
diff --git a/rhel/usr_lib_systemd_system_ovsdb-server.service 
b/rhel/usr_lib_systemd_system_ovsdb-server.service
new file mode 100644
index 0000000..e4c2a66
--- /dev/null
+++ b/rhel/usr_lib_systemd_system_ovsdb-server.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Open vSwitch Internal Unit
+After=syslog.target
+PartOf=openvswitch.service
+Wants=openvswitch.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+EnvironmentFile=-/etc/sysconfig/openvswitch
+ExecStart=/usr/share/openvswitch/scripts/ovs-ctl start \
+          --system-id=random $OPTIONS
+ExecStop=/usr/share/openvswitch/scripts/ovs-ctl stop
+RuntimeDirectory=openvswitch
+RuntimeDirectoryMode=0755
-- 
2.5.5

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to