[ovs-dev] [PATCH v11] AB bonding: Add "primary" interface concept

Jeff Squyres (jsquyres) jsquyres at cisco.com
Thu Jul 9 23:55:42 UTC 2020


On Jul 8, 2020, at 11:24 PM, Flavio Leitner <fbl at sysclose.org> wrote:
> 
> I think there is still an issue with this version where one could
> change the bond-primary after adding a bond port. See the sequence
> below:
> 
>  # ovs-vsctl add-bond br0 bond0 p1 p2 \
>        bond_mode=active-backup \
>        other_config:bond-primary=p1
> 
> Here the bond_slave_register() will set the is_primary correctly,
> but then one could do this:
> 
>  # ovs-vsctl set port bond0 other_config:bond-primary=p2
> 
> The above will not change the primary slave. Neither this:
> 
>  # ovs-vsctl remove port bond0 other_config bond-primary
> 
> Because the slaves are initialized, so they don't change.

Excellent catch, thank you!

I applied your fix and added a test for exactly this case.

v12 coming shortly.

-- 
Jeff Squyres
jsquyres at cisco.com



More information about the dev mailing list