From patchwork Mon Aug 7 17:27:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gurucharan Shetty X-Patchwork-Id: 798795 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xR4HT4pdvz9rxm for ; Tue, 8 Aug 2017 03:28:04 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 9DC82B49; Mon, 7 Aug 2017 17:27:58 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 415DCB14 for ; Mon, 7 Aug 2017 17:27:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 3897A1C0 for ; Mon, 7 Aug 2017 17:27:31 +0000 (UTC) Received: from mfilter18-d.gandi.net (mfilter18-d.gandi.net [217.70.178.146]) by relay7-d.mail.gandi.net (Postfix) with ESMTP id B041D593 for ; Mon, 7 Aug 2017 19:27:29 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter18-d.gandi.net Received: from relay7-d.mail.gandi.net ([IPv6:::ffff:217.70.183.200]) by mfilter18-d.gandi.net (mfilter18-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id aR5jK3O3lWvb for ; Mon, 7 Aug 2017 19:27:28 +0200 (CEST) X-Originating-IP: 209.85.217.179 Received: from mail-ua0-f179.google.com (mail-ua0-f179.google.com [209.85.217.179]) (Authenticated sender: guru@ovn.org) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id E403B538 for ; Mon, 7 Aug 2017 19:27:27 +0200 (CEST) Received: by mail-ua0-f179.google.com with SMTP id w45so4650646uac.5 for ; Mon, 07 Aug 2017 10:27:27 -0700 (PDT) X-Gm-Message-State: AHYfb5juIw9Tij0goJ5UGcSu+dLugn6K3u7/+w0jCpO9kPN4TWeod4mG VN23aR7V+pLL145O7mDNEsrUbCOwJA== X-Received: by 10.176.16.17 with SMTP id f17mr846564uab.167.1502126846688; Mon, 07 Aug 2017 10:27:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.159.54.241 with HTTP; Mon, 7 Aug 2017 10:27:26 -0700 (PDT) In-Reply-To: <20170807171436.GR6175@ovn.org> References: <1502085390-1709-1-git-send-email-guru@ovn.org> <20170807165023.GP6175@ovn.org> <20170807171436.GR6175@ovn.org> From: Guru Shetty Date: Mon, 7 Aug 2017 10:27:26 -0700 X-Gmail-Original-Message-ID: Message-ID: To: Ben Pfaff X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_LOW autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org X-Content-Filtered-By: Mailman/MimeDel 2.1.12 Cc: ovs dev Subject: Re: [ovs-dev] [PATCH] debian: Add another note on interfaces in "auto" section. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org On 7 August 2017 at 10:14, Ben Pfaff wrote: > On Mon, Aug 07, 2017 at 10:10:40AM -0700, Guru Shetty wrote: > > On 7 August 2017 at 09:50, Ben Pfaff wrote: > > > > > On Sun, Aug 06, 2017 at 10:56:30PM -0700, Gurucharan Shetty wrote: > > > > We had one note about the issues with adding OVS interfaces > > > > in the "auto" section. This commit adds another note about > > > > how adding OVS bridges in the "auto" section can cause > > > > race conditions with systemd. > > > > > > > > Signed-off-by: Gurucharan Shetty > > > > --- > > > > debian/openvswitch-switch.README.Debian | 8 ++++++++ > > > > 1 file changed, 8 insertions(+) > > > > > > > > diff --git a/debian/openvswitch-switch.README.Debian > > > b/debian/openvswitch-switch.README.Debian > > > > index 5f8f823..d236824 100644 > > > > --- a/debian/openvswitch-switch.README.Debian > > > > +++ b/debian/openvswitch-switch.README.Debian > > > > @@ -231,3 +231,11 @@ in the 'auto' section, openvswitch-switch will > > > forcefully be started when > > > > ifupdown kicks in. In a case like this, the admin needs to make sure > > > that /usr > > > > has already been mounted and that a remote $syslog (if used) is > ready to > > > > receive openvswitch logs. > > > > + > > > > +* With systemd, adding openvswitch bridges in the 'auto' section of > the > > > > +'interfaces' file can cause race conditions. Debian systems have > added > > > a > > > > +systemd ifup@.service file. This file will call ifdown and ifup on > > > interfaces > > > > +in "auto" section automatically when they disappear and appear > > > respectively. > > > > +This will cause race conditions if you delete and add the same > bridges > > > using > > > > +tools like "ovs-vsctl" or "ovs-dpctl". This is also a problem when > you > > > > +upgrade your openvswitch kernel module using commands like > > > 'force-reload-kmod'. > > > > > > I'm not really sure what the "auto" section is. Do you just mean that > > > they should not add lines like "auto br0" where br0 is an Open vSwitch > > > bridge? (I do see that there is already some wording about an "auto" > > > section.) > > > > > Yes. Adding lines like "auto br0" is a license for systemd to handle them > > "automatically". > > OK, can we reword this (including the existing text) a little bit, to be > more precise? I think that referring to this feature as a section is > going to cause confusion for others, too. > How about the following diff to the existing text (and then repeat the same in this commit)?: But, if the admin wants to go down this route and adds openvswitch bridges > > Thanks, > > Ben. > Acked-by: Ben Pfaff diff --git a/debian/openvswitch-switch.README.Debian b/debian/openvswitch-switch.README. index 5f8f823..200266e 100644 --- a/debian/openvswitch-switch.README.Debian +++ b/debian/openvswitch-switch.README.Debian @@ -223,7 +223,8 @@ script that depends on openvswitch but starts before it, needs to be to depend on openvswitch-switch too. * Ideally, an admin should not add openvswitch bridges in the 'auto' -section of the 'interfaces' file. This is because, when ifupdown starts +section of the 'interfaces' file (i.e., if "br0" is a OVS bridge, you should +not have a line "auto br0"). This is because, when ifupdown starts working on bridges listed in 'auto', openvswitch has not yet started.