[ovs-dev] debian: Add another note on interfaces in "auto" section.

Message ID 1502085390-1709-1-git-send-email-guru@ovn.org
State New
Headers show

Commit Message

Guru Shetty Aug. 7, 2017, 5:56 a.m.
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 <guru@ovn.org>
---
 debian/openvswitch-switch.README.Debian | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Ben Pfaff Aug. 7, 2017, 4:50 p.m. | #1
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 <guru@ovn.org>
> ---
>  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.)

Thanks,

Ben.
Guru Shetty Aug. 7, 2017, 5:10 p.m. | #2
On 7 August 2017 at 09:50, Ben Pfaff <blp@ovn.org> 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 <guru@ovn.org>
> > ---
> >  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".




> Thanks,
>
> Ben.
>
Ben Pfaff Aug. 7, 2017, 5:14 p.m. | #3
On Mon, Aug 07, 2017 at 10:10:40AM -0700, Guru Shetty wrote:
> On 7 August 2017 at 09:50, Ben Pfaff <blp@ovn.org> 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 <guru@ovn.org>
> > > ---
> > >  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.

Thanks,

Ben.

Patch

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'.