From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935495AbcIFO7Y (ORCPT ); Tue, 6 Sep 2016 10:59:24 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:32996 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935358AbcIFO7V (ORCPT ); Tue, 6 Sep 2016 10:59:21 -0400 Date: Tue, 6 Sep 2016 16:59:16 +0200 From: Jiri Pirko To: "Kaur, Jasminder" Cc: j.vosburgh@gmail.com, vfalico@gmail.com, gospo@cumulusnetworks.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, vasundhara.gurunath@hpe.com, paulose.kuriakose.arackal@hpe.com Subject: Re: [PATCH] bonding: Prevent deletion of a bond, or the last slave from a bond, with active usage. Message-ID: <20160906145916.GI1692@nanopsycho> References: <1473154470-15087-1-git-send-email-jasminder.kaur@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1473154470-15087-1-git-send-email-jasminder.kaur@hpe.com> User-Agent: Mutt/1.6.2 (2016-07-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tue, Sep 06, 2016 at 11:34:30AM CEST, jasminder.kaur@hpe.com wrote: >From: "Kaur, Jasminder" > >If a bond is in use such as with IP address configured, removing it >can result in application disruptions. If bond is used for cluster >communication or network file system interfaces, removing it can cause >system down time. > >An additional write option “?-” is added to sysfs bond interfaces as >below, in order to prevent accidental deletions while bond is in use. >In the absence of any usage, the below option proceeds with bond deletion. >“ echo "?-bondX" > /sys/class/net/bonding_masters “ . >If usage is detected such as an IP address configured, deletion is >prevented with appropriate message logged to syslog. > >In the absence of any usage, the below option proceeds with deletion of >slaves from a bond. >“ echo "?-enoX" > /sys/class/net/bondX/bonding/slaves “ . >If usage is detected such as an IP address configured on bond, deletion >is prevented if the last slave is being removed from bond. >An appropriate message is logged to syslog. NACK sysfs bonding iface should die in peace, don't poke in it. Either fix you application or fix you configuration flow. Don't do this in kernel.