Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751303AbbHQUvs (ORCPT ); Mon, 17 Aug 2015 16:51:48 -0400 Received: from mail-bn1on0139.outbound.protection.outlook.com ([157.56.110.139]:26448 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750710AbbHQUvp (ORCPT ); Mon, 17 Aug 2015 16:51:45 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=uwe.koziolek@redknee.com; Message-ID: <55D2494F.3020800@redknee.com> Date: Mon, 17 Aug 2015 22:51:27 +0200 From: Uwe Koziolek User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: Jay Vosburgh CC: Jarod Wilson , Veaceslav Falico , , Andy Gospodarek , Subject: Re: [PATCH] net/bonding: send arp in interval if no active slave References: <1439828583-27325-1-git-send-email-jarod@redhat.com> <20150817165500.GA21512@vps.falico.eu> <55D215F7.3080905@redhat.com> <55D22E64.6020807@redknee.com> <2649.1439838866@famine> In-Reply-To: <2649.1439838866@famine> Content-Type: text/plain; charset="iso-8859-15"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [79.197.198.56] X-ClientProxiedBy: DB4PR07CA007.eurprd07.prod.outlook.com (10.242.229.17) To SN2PR0501MB912.namprd05.prod.outlook.com (25.160.17.142) X-Microsoft-Exchange-Diagnostics: 1;SN2PR0501MB912;2:UVcwdzKVZjfjkD08NBIJK01ZbpWoZRfdF9c6G8ilkR9jmUhCtxHelXKKy3jZrp5iLOihjNnzyEJ4TRzUICdnOrb1JVETuyy4xFuP/onWvJe1i+M6cdDeK6u3NPn3Q7ZBJb7Q5CjalGYhnpSLPrk0jpqaTEZvZDTPl8GNl+M5/fo=;3:wkBY93FycWlVwPXv8zE/jHB73W36bNF1Fal1geLUsolpTZE9ltv1BruX50QPkXzDQpZUekQxoUmO6NzJBYHtNM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/kBXt/AW7S8TeQaAHIckK/7a2rnd6LXMhtB8vLxFowHVp7KJzVqndn5Z6SX3v60+AnrNw+RC/cHbpK5KNthrPDoOQpihc4tUi//eneVvn1jf5TFAbnr2Ds1xg9s8u9JKBsl9dNqwExPMW2Ag3wvfkDWhVpwuSAR5sNKdDxv1SSUTOFfcQaiLgOYu4VugQ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(8121501046)(3002001);SRVR:SN2PR0501MB912;BCL:0;PCL:0;RULEID:;SRVR:SN2PR0501MB912; X-Forefront-PRVS: 0671F32598 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6049001)(6009001)(377454003)(377424004)(189002)(199003)(24454002)(54534003)(87266999)(77156002)(66066001)(76176999)(64706001)(62966003)(64126003)(47776003)(2950100001)(106356001)(40100003)(77096005)(83506001)(19580405001)(68736005)(86362001)(93886004)(33656002)(50466002)(23756003)(122386002)(87976001)(54356999)(105586002)(42186005)(19580395003)(65816999)(59896002)(65956001)(46102003)(92566002)(36756003)(65806001)(81156007)(5001830100001)(80316001)(101416001)(110136002)(117156001)(4001540100001)(50986999)(5001960100002)(189998001)(97736004)(5001860100001)(4001350100001);DIR:OUT;SFP:1102;SCL:1;SRVR:SN2PR0501MB912;H:[192.168.222.3];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?iso-8859-15?Q?1;SN2PR0501MB912;23:VHk9tnYYTJlw+rg0/kPs5iajgWYbXCc1p5Bae?= =?iso-8859-15?Q?QntZxpGKqLKQZU/LwULNtT+D6xknW8ksMFwZxxWG3mM/iz3w4FdKsXSHc?= =?iso-8859-15?Q?7qXI79g//OlgkKRYgGFqO8hOCj+MSWA0ul0mMe6clZX3FH7H9L+Q7CSMP?= =?iso-8859-15?Q?31mWm37i1vWuOCurMi6Wzyyy7GXX3TCCUZ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z1iQ478QBWvC8rvI2pYV10tlK+YSw9/Ul/34NmCu?= =?iso-8859-15?Q?n0s3E3CTliUrUgCxzD7Dqm5QOprdBmbS7LQi0+9DZYrdZy58MYggvr2PP?= =?iso-8859-15?Q?AnUq9b3drmBkzNAxHg+vZHj9v7qh3lfAWamGZbeZ850Ys16KQVSHk622k?= =?iso-8859-15?Q?5M8wq8RHCgGea3V+0f90A1gPXm1B387XTXGPIOS13Hy9M4iruXvA4jv0G?= =?iso-8859-15?Q?xVB2uwSTFLFvTsYX+n8zrfwJkeGGXyPJtQ+zsQutaft9C81ZSSp4Qq3Lk?= =?iso-8859-15?Q?JaEmk7E1tAj2Cz57bbjovg8KA0h8XJM+5MfpUoGnZ0Ar10LQiqmkxXkRL?= =?iso-8859-15?Q?GOakuSGMqFyS9QTnaa155pzq5miaZYJh0exsHvE=3D?= X-Microsoft-Exchange-Diagnostics: 1;SN2PR0501MB912;5:Co0XDWpxmh2Ko4A6QS/r07rqLHlDBRiTNP5r/HHMGp44Te3WBg+SRkGmoOx2QMP/SE70abqwTe95o+6iep40aMKyB8i0ekwVzU+CK8svZ8CtqSCFzCoof34aIMUgYo2biZPuNe4l4WGx06YPPVxLSQ==;24:6eYQAX0cCzjF/SPfRTLXX1z5G+y3N0uoBOHoBWJ/wjpHeLZvXXOHI/YwE0QsqovDtM/5Mfs1MMmAnKuW4jWGquepWRo168XHjdzGmVpwFYE=;20:BaGl94id2XeQ7b5RxNY/pXzB1d0dsb8uUV3A65qRmAEtlzAVAu5tYbBe3OjwMuBkwLfPxAh6XOlk/rDLP6Xasw== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: redknee.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Aug 2015 20:51:42.1098 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR0501MB912 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 7125 Lines: 156 On Mon, Aug 17, 2015 at 09:14PM +0200, Jay Vosburgh wrote: > Uwe Koziolek wrote: > >> On2015-08-17 07:12 PM,Jarod Wilson wrote: >>> On 2015-08-17 12:55 PM, Veaceslav Falico wrote: >>>> On Mon, Aug 17, 2015 at 12:23:03PM -0400, Jarod Wilson wrote: >>>>> From: Uwe Koziolek >>>>> >>>>> With some very finicky switch hardware, active backup bonding can get >>>>> into >>>>> a situation where we play ping-pong between interfaces, trying to get >>>>> one >>>>> to come up as the active slave. There seems to be an issue with the >>>>> switch's arp replies either taking too long, or simply getting lost, >>>>> so we >>>>> wind up unable to get any interface up and active. Sometimes, the issue >>>>> sorts itself out after a while, sometimes it doesn't. >>>>> >>>>> Testing with num_grat_arp has proven fruitless, but sending an >>>>> additional >>>>> arp on curr_arp_slave if we're still in the arp_interval timeslice in >>>>> bond_ab_arp_probe(), has shown to produce 100% reliability in testing >>>>> with >>>>> this hardware combination. >>>> Sorry, I don't understand the logic of why it works, and what exactly >>>> are >>>> we fixiing here. >>>> >>>> It also breaks completely the logic for link state management in case >>>> of no >>>> current active slave for 2*arp_interval. >>>> >>>> Could you please elaborate what exactly is fixed here, and how it >>>> works? :) >>> I can either duplicate some information from the bug, or Uwe can, to >>> illustrate the exact nature of the problem. >>> >>>> p.s. num_grat_arp maybe could help? >>> That was my thought as well, but as I understand it, that route was >>> explored, and it didn't help any. I don't actually have a reproducer >>> setup of my own, unfortunately, so I'm kind of caught in the middle >>> here... >>> >>> Uwe, can you perhaps further enlighten us as to what num_grat_arp >>> settings were tried that didn't help? I'm still of the mind that if >>> num_grat_arp *didn't* help, we probably need to do something keyed off >>> num_grat_arp. >> The bonding slaves are connected to high available switches, each of the >> slaves is connected to a different switch. If the bond is starting, only >> the selected slave sends one arp-request. If a matching arp_response was >> received, this slave and the bond is going into state up, sending the >> gratitious arps... >> But if you got no arp reply the next slave was selected. >> With most of the newer switches, not overloaded, or with other software >> bugs, or with a single switch configuration, you would get a arp response >> on the first arp request. >> But in case of high availability configuration with non perfect switches >> like HP ProCurve 54xx, also with some Cisco models, you may not get a >> response on the first arp request. >> >> I have seen network snoops, there the switches are not responding to the >> first arp request on slave 1, the second arp request was sent on slave 2 >> but the response was received on slave one, and all following arp >> requests are anwsered on the wrong slave for a longer time. > Could you elaborate on the exact "high availability > configuration" here, including the model(s) of switch(es) involved? > > Is this some kind of race between the switch or switches > updating the forwarding tables and the bond flip flopping between the > slaves? E.g., source MAC from ARP sent on slave 1 is used to populate > the forwarding table, but (for whatever reason) there is no reply. ARP > on slave 2 is sent (using the same source MAC, unless you set > fail_over_mac), but forwarding tables still send that MAC to slave 1, so > reply is sent there. High availability: 2 managed switches with routing capabilities have an interconnect. One slave of a bonding interface is connected to the first switch, the second slave is connected to the other switch. The switch models are HP ProCurve 5406 and HP ProCurve 5412. As far as i remember also HP E 3500 and E 3800 are also affected, for the affected Cisco models I can't answer today. Affected single switch configurations was not seen. Yes, race conditions with delayed upgrades of the forwarding tables is a well matching explanation for the problem. >> The proposed change sents up to 3 arp requests on a down bond using the >> same slave, delayed by arp_interval. >> Using problematic switches i have seen the the arp response on the right >> slave at latest on the second arp request. So the bond is going into state >> up. >> >> How does it works: >> The bonds in up state are handled on the beginning of bond_ab_arp_probe >> procedure, the other part of this procedure is handling the slave change. >> The proposed change is bypassing the slave change for 2 additional calls >> of bond_ab_arp_probe. >> Now the retries are not only for an up bond available, they are also >> implemented for a down bond. > Does this delay failover or bringup on switches that are not > "problematic"? I.e., if arp_interval is, say, 1000 (1 second), will > this impact failover / recovery times? > > -J It depends. failover times are not impacted, this is handled different. Only the transition from a down bonding interface (bond and all slaves are down) to the state up can be increased by up to 2 times arp_interval, If the selected interface did not came up .If well working switches are used, and everything other is also ok, there are no impacts. >> The num_grat_arp has no chance to solve the problem. The num_grat_arp is >> only used, if a different slave is going active. >> But in our case, the bonding slaves are not going into the state active >> for a longer time. >>>>> [jarod: manufacturing of changelog] >>>>> CC: Jay Vosburgh >>>>> CC: Veaceslav Falico >>>>> CC: Andy Gospodarek >>>>> CC: netdev@vger.kernel.org >>>>> Signed-off-by: Uwe Koziolek >>>>> Signed-off-by: Jarod Wilson >>>>> --- >>>>> drivers/net/bonding/bond_main.c | 5 +++++ >>>>> 1 file changed, 5 insertions(+) >>>>> >>>>> diff --git a/drivers/net/bonding/bond_main.c >>>>> b/drivers/net/bonding/bond_main.c >>>>> index 0c627b4..60b9483 100644 >>>>> --- a/drivers/net/bonding/bond_main.c >>>>> +++ b/drivers/net/bonding/bond_main.c >>>>> @@ -2794,6 +2794,11 @@ static bool bond_ab_arp_probe(struct bonding >>>>> *bond) >>>>> return should_notify_rtnl; >>>>> } >>>>> >>>>> + if (bond_time_in_interval(bond, curr_arp_slave->last_link_up, 2)) >>>>> { >>>>> + bond_arp_send_all(bond, curr_arp_slave); >>>>> + return should_notify_rtnl; >>>>> + } >>>>> + >>>>> bond_set_slave_inactive_flags(curr_arp_slave, >>>>> BOND_SLAVE_NOTIFY_LATER); >>>>> >>>>> bond_for_each_slave_rcu(bond, slave, iter) { >>>>> -- >>>>> 1.8.3.1 > --- > -Jay Vosburgh, jay.vosburgh@canonical.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/