netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: razor@blackwall.org
Cc: netdev@vger.kernel.org, monis@voltaire.com, j.vosburgh@gmail.com,
	gospo@cumulusnetworks.com, vfalico@gmail.com,
	nikolay@cumulusnetworks.com
Subject: Re: [PATCH net] bonding: correctly handle bonding type change on enslave failure
Date: Mon, 20 Jul 2015 16:23:29 -0700 (PDT)	[thread overview]
Message-ID: <20150720.162329.1291501032199854301.davem@davemloft.net> (raw)
In-Reply-To: <1436993821-4114-1-git-send-email-razor@blackwall.org>

From: Nikolay Aleksandrov <razor@blackwall.org>
Date: Wed, 15 Jul 2015 22:57:01 +0200

> From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
> 
> If the bond is enslaving a device with different type it will be setup
> by it, but if after being setup the enslave fails the bond doesn't
> switch back its type and also keeps pointers to foreign structures that can
> be long gone. Thus revert back any type changes if the enslave failed and
> the bond had to change its type.
> Example:
>  Before patch:
> $ echo lo > bond0/bonding/slaves
> -bash: echo: write error: Cannot assign requested address
> $ ip l sh bond0
> 20: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN
> mode DEFAULT group default
>     link/loopback 16:54:78:34:bd:41 brd 00:00:00:00:00:00
> $ echo +eth1 > bond0/bonding/slaves
> $ ip l sh bond0
> 20: bond0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode
> DEFAULT group default qlen 1000
>     link/ether 52:54:00:3f:47:69 brd ff:ff:ff:ff:ff:ff
> (notice the MASTER flag is gone)
> 
>  After patch:
> $ echo lo > bond0/bonding/slaves
> -bash: echo: write error: Cannot assign requested address
> $ ip l sh bond0
> 21: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN
> mode DEFAULT group default qlen 1000
>     link/ether 6e:66:94:f6:07:fc brd ff:ff:ff:ff:ff:ff
> $ echo +eth1 > bond0/bonding/slaves
> $ ip l sh bond0
> 21: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN
> mode DEFAULT group default qlen 1000
>     link/ether 52:54:00:3f:47:69 brd ff:ff:ff:ff:ff:ff
> 
> Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
> Fixes: e36b9d16c6a6 ("bonding: clean muticast addresses when device changes type")

Applied.

      reply	other threads:[~2015-07-20 23:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-15 20:57 [PATCH net] bonding: correctly handle bonding type change on enslave failure Nikolay Aleksandrov
2015-07-20 23:23 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150720.162329.1291501032199854301.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=gospo@cumulusnetworks.com \
    --cc=j.vosburgh@gmail.com \
    --cc=monis@voltaire.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    --cc=razor@blackwall.org \
    --cc=vfalico@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).