From patchwork Fri Oct 7 17:36:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 679676 X-Patchwork-Delegate: rbryant@redhat.com 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 3srGsx72NJz9sCZ for ; Sat, 8 Oct 2016 04:36:52 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 77709109F1; Fri, 7 Oct 2016 10:36:51 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e3.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 0711E1099D for ; Fri, 7 Oct 2016 10:36:50 -0700 (PDT) Received: from bar5.cudamail.com (localhost [127.0.0.1]) by mx1e3.cudamail.com (Postfix) with ESMTPS id 4F99A4206D4 for ; Fri, 7 Oct 2016 11:36:49 -0600 (MDT) X-ASG-Debug-ID: 1475861808-09eadd489f2b0b0001-byXFYA Received: from mx3-pf2.cudamail.com ([192.168.14.1]) by bar5.cudamail.com with ESMTP id qUpCRz3CT301nYNf (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 07 Oct 2016 11:36:48 -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); 7 Oct 2016 17:36:48 -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-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (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 35EC085542 for ; Fri, 7 Oct 2016 17:36:47 +0000 (UTC) Received: from dhcp-25-97.bos.redhat.com (dhcp-25-172.bos.redhat.com [10.18.25.172]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u97HakKC000619 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 7 Oct 2016 13:36:46 -0400 X-CudaMail-Envelope-Sender: aconole@redhat.com From: Aaron Conole To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-V2-1006028829 X-CudaMail-DTE: 100716 X-CudaMail-Originating-IP: 209.132.183.28 Date: Fri, 07 Oct 2016 13:36:45 -0400 X-ASG-Orig-Subj: [##CM-V2-1006028829##][PATCH] rhel-systemd: Delay shutting down the services Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 07 Oct 2016 17:36:47 +0000 (UTC) X-Barracuda-Connect: UNKNOWN[192.168.14.1] X-Barracuda-Start-Time: 1475861808 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] [PATCH] rhel-systemd: Delay shutting down the services 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: , Errors-To: dev-bounces@openvswitch.org Sender: "dev" During testing it was found that systemd would consider the openvswitch service as a part of networking component, but the dependent services of ovs-vswitchd and ovsdb-server were not likewise considered. This leads to some strange race conditions, observed when using NFS over TCP, while shutting down systems. Fixes: 84ad12083491 ("rhel: Improved Systemd Integration") Co-authored-by: Flavio Leitner Signed-off-by: Aaron Conole Signed-off-by: Flavio Leitner --- rhel/usr_lib_systemd_system_openvswitch.service | 2 ++ rhel/usr_lib_systemd_system_ovs-vswitchd.service | 3 ++- rhel/usr_lib_systemd_system_ovsdb-server.service | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/rhel/usr_lib_systemd_system_openvswitch.service b/rhel/usr_lib_systemd_system_openvswitch.service index a44574b..e823c54 100644 --- a/rhel/usr_lib_systemd_system_openvswitch.service +++ b/rhel/usr_lib_systemd_system_openvswitch.service @@ -1,5 +1,7 @@ [Unit] Description=Open vSwitch +Before=network.target network.service +After=network-pre.target PartOf=network.target BindsTo=ovsdb-server.service BindsTo=ovs-vswitchd.service diff --git a/rhel/usr_lib_systemd_system_ovs-vswitchd.service b/rhel/usr_lib_systemd_system_ovs-vswitchd.service index d3d020a..01d9cee 100644 --- a/rhel/usr_lib_systemd_system_ovs-vswitchd.service +++ b/rhel/usr_lib_systemd_system_ovs-vswitchd.service @@ -1,6 +1,7 @@ [Unit] Description=Open vSwitch Forwarding Unit -After=ovsdb-server.service +After=ovsdb-server.service network-pre.target +Before=network.target network.service Requires=ovsdb-server.service ReloadPropagatedFrom=ovsdb-server.service AssertPathIsReadWrite=/var/run/openvswitch/db.sock diff --git a/rhel/usr_lib_systemd_system_ovsdb-server.service b/rhel/usr_lib_systemd_system_ovsdb-server.service index 46e3e08..d3d7408 100644 --- a/rhel/usr_lib_systemd_system_ovsdb-server.service +++ b/rhel/usr_lib_systemd_system_ovsdb-server.service @@ -1,6 +1,7 @@ [Unit] Description=Open vSwitch Database Unit -After=syslog.target +After=syslog.target network-pre.target +Before=network.target network.service ReloadPropagatedFrom=openvswitch.service PartOf=openvswitch.service