Re: [PATCH] bonding: Prevent deletion of a bond, or the last slave from a bond, with active usage.
From: Jiri Pirko
Date: Tue Sep 06 2016 - 10:59:30 EST
Tue, Sep 06, 2016 at 11:34:30AM CEST, jasminder.kaur@xxxxxxx wrote:
>From: "Kaur, Jasminder" <jasminder.kaur@xxxxxxx>
>
>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.