Page MenuHomeVyOS Platform

Move application of STP settings for bridge members from interfaces-bridge.py to Interface.add_to_bridge()
Closed, ResolvedPublicENHANCEMENT

Description

To fix T2241, a new method of Interfaces was created, add_to_bridge(), to allow any interface to add itself to the bridge when it needs to, not only when the bridge interface code is ran. The port config was already moved out to vyos.util.get_bridge_member_config() to allow it to be queried from different places.

The only thing left to do is apply this member/port config in add_to_bridge.

The current interfaces-bridge.py code uses the STP class, I'm not exactly sure how it was meant to operate - it seems to extend an empty BridgeIf class with STP STPBridgeIf= STP.enable(BridgeIf), but then applies its methods to a member interface i = STPBridgeIf(member['name']); i.set_arp_cache_tmo(member['arp_cache_tmo']). Confusingly STP.enable doesn't seem to enable STP at all, it just extends the class it was passed with its own methods for STP.

It's all pretty confusing to me and I'd appreciate the owner of that code to sort this out.

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Internal change (not visible to end users)

Event Timeline

jjakob triaged this task as High priority.May 9 2020, 9:00 AM
jjakob created this task.
jjakob created this object in space S1 VyOS Public.

If enable is not clear as a name to say that it adds the feature to the class, it is a class decorator, then please suggest a better name.

syncer changed the subtype of this task from "Task" to "Enhancement".Jun 12 2020, 5:09 PM

STPBridgeIf has been decomissioned

c-po changed the task status from Invalid to Resolved.
erkin set Issue type to Internal change (not visible to end users).Aug 30 2021, 6:17 AM
erkin removed a subscriber: Active contributors.