From patchwork Fri Jul 1 21:26:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 643246 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3rh8cC6w0hz9t0V for ; Sat, 2 Jul 2016 07:26:35 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id D898722C3A9; Fri, 1 Jul 2016 14:26:30 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e4.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 8B3AD22C39D for ; Fri, 1 Jul 2016 14:26:29 -0700 (PDT) Received: from bar5.cudamail.com (unknown [192.168.21.12]) by mx1e4.cudamail.com (Postfix) with ESMTPS id 0C6901E0956 for ; Fri, 1 Jul 2016 15:26:29 -0600 (MDT) X-ASG-Debug-ID: 1467408386-09eadd3a075b210001-byXFYA Received: from mx3-pf2.cudamail.com ([192.168.14.1]) by bar5.cudamail.com with ESMTP id hhWnNEZnBfxdRXyk (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 01 Jul 2016 15:26:27 -0600 (MDT) X-Barracuda-Envelope-From: aconole@redhat.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.1 Received: from unknown (HELO mx1.redhat.com) (209.132.183.28) by mx3-pf2.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 1 Jul 2016 21:26:26 -0000 Received-SPF: pass (mx3-pf2.cudamail.com: SPF record at _spf1.redhat.com designates 209.132.183.28 as permitted sender) X-Barracuda-Apparent-Source-IP: 209.132.183.28 X-Barracuda-RBL-IP: 209.132.183.28 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 19A032F40E4; Fri, 1 Jul 2016 21:26:26 +0000 (UTC) Received: from dhcp-25-97.bos.redhat.com (dhcp-25-172.bos.redhat.com [10.18.25.172]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u61LQOlh003267; Fri, 1 Jul 2016 17:26:25 -0400 X-CudaMail-Envelope-Sender: aconole@redhat.com From: Aaron Conole To: dev@openvswitch.org, Flavio Leitner , Russell Bryant X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-V2-630043278 X-CudaMail-DTE: 070116 X-CudaMail-Originating-IP: 209.132.183.28 Date: Fri, 1 Jul 2016 17:26:22 -0400 X-ASG-Orig-Subj: [##CM-V2-630043278##][RFC 2/3] rhel/ovsdb-server.service: Rename the nonetwork service Message-Id: <1467408383-5703-3-git-send-email-aconole@redhat.com> In-Reply-To: <1467408383-5703-1-git-send-email-aconole@redhat.com> References: <1467408383-5703-1-git-send-email-aconole@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 01 Jul 2016 21:26:26 +0000 (UTC) X-Barracuda-Connect: UNKNOWN[192.168.14.1] X-Barracuda-Start-Time: 1467408387 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Subject: [ovs-dev] [RFC 2/3] rhel/ovsdb-server.service: Rename the nonetwork service X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" Currently, openvswitch.service calls out to start openvswitch-nonetwork.service. However, openvswitch-nonetwork.service is better called ovsdb-server, since that is truly nonetwork. This commit does make the file a bit of a misnomer - currently the ovsdb-server service will start the ovs-vswitchd service as well. A future commit will clean this up. Signed-off-by: Aaron Conole --- rhel/automake.mk | 2 +- rhel/etc_sysconfig_network-scripts_ifdown-ovs | 14 +++++++------- rhel/etc_sysconfig_network-scripts_ifup-ovs | 14 +++++++------- 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, 34 insertions(+), 34 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..b57aebf 100755 --- a/rhel/etc_sysconfig_network-scripts_ifdown-ovs +++ b/rhel/etc_sysconfig_network-scripts_ifdown-ovs @@ -34,15 +34,15 @@ 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 - fi + if ! systemctl --quiet is-active ovsdb-server.service; then + systemctl start ovsdb-server.service + fi else - if [ ! -f /var/lock/subsys/openvswitch ]; then - /sbin/service openvswitch start - fi + if [ ! -f /var/lock/subsys/openvswitch ]; then + /sbin/service openvswitch start + fi fi case "$TYPE" in diff --git a/rhel/etc_sysconfig_network-scripts_ifup-ovs b/rhel/etc_sysconfig_network-scripts_ifup-ovs index f3fc05e..9b2efbb 100755 --- a/rhel/etc_sysconfig_network-scripts_ifup-ovs +++ b/rhel/etc_sysconfig_network-scripts_ifup-ovs @@ -60,15 +60,15 @@ 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 - fi + if ! systemctl --quiet is-active ovsdb-server.service; then + systemctl start ovsdb-server.service + fi else - if [ ! -f /var/lock/subsys/openvswitch ]; then - /sbin/service openvswitch start - fi + if [ ! -f /var/lock/subsys/openvswitch ]; then + /sbin/service openvswitch start + fi fi case "$TYPE" in diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in index 16894b0..ed7b3c4 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