-
Notifications
You must be signed in to change notification settings - Fork 562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[vlanmgrd]: Create a dummy interface and put into the Bridge #730
Conversation
this is for 201803 branch |
cfgmgr/vlanmgr.cpp
Outdated
// /sbin/bridge vlan del vid 1 dev Bridge self; | ||
// /sbin/ip link del dummy 2>/dev/null; | ||
// /sbin/ip link add dummy type dummy &&" | ||
// /sbin/ip link set dummy master Bridge" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be "/sbin/ip link set dummy up master Bridge"
cfgmgr/vlanmgr.cpp
Outdated
+ BRIDGE_CMD + " vlan del vid " + DEFAULT_VLAN_ID + " dev " + DOT1Q_BRIDGE_NAME + " self; " | ||
+ IP_CMD + " link del dummy 2>/dev/null; " | ||
+ IP_CMD + " link add dummy type dummy && " | ||
+ IP_CMD + " link set dummy up master Bridge\""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change "Bridge" to "DOT1Q_BRIDGE_NAME" ?
In order to maintain the interface Bridge to be UP all the time, the dummy interface is needed to be the member of the Bridge. Refactored test_vlan.py so that each test is independent from each other and intermediate state will be cleaned up afterwards. Add test_MultipleVlan test to cover scenarios with VLAN and VLAN members change. Before the change of the vlanmgrd, this test would fail when all the VLAN members were removed out of the master. Interface Bridge would show NO-CARRIER and new VLAN cannot be created afterwards. After adding the dummy interface, this test will pass. Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
44952c3
to
8654751
Compare
@zhenggen-xu updated |
@stcheng Thanks for the change, sorry some comments were not given before: I saw the commit message "Add test_MultipleVlan test to cover scenarios with VLAN and VLAN members change.", did you add that test cases somewhere? or should it be part of this PR? Also, let's define the "dummy" interface name as a macro, so code can refer to it. Thanks! |
Hi @stcheng and @zhenggen-xu |
addressed by @jipanyang |
Hi all |
@chenkelly #1001 please check this one |
The code is to add/del items in LAG_NAME_MAP_TABLE in COUNTERS_DB if a lag is added or removed. The code need the below pull request: #51 in Azure/sonic-py-swsssdk read portchannel name from LAG_NAME_MAP_TABLE in COUNTERS_DB #51 For use of LAG_NAME_MAP_TABLE in COUNTERS_DB just like fdbshow. I have create another pull request in Azure/sonic-utilities: Show mac learned on lag interface #730
The code is to add/del items in LAG_NAME_MAP_TABLE in COUNTERS_DB if a lag is added or removed. The code need the below pull request: #51 in Azure/sonic-py-swsssdk read portchannel name from LAG_NAME_MAP_TABLE in COUNTERS_DB #51 For use of LAG_NAME_MAP_TABLE in COUNTERS_DB just like fdbshow. I have create another pull request in Azure/sonic-utilities: Show mac learned on lag interface #730
The code is to add/del items in LAG_NAME_MAP_TABLE in COUNTERS_DB if a lag is added or removed. The code need the below pull request: #51 in Azure/sonic-py-swsssdk read portchannel name from LAG_NAME_MAP_TABLE in COUNTERS_DB #51 For use of LAG_NAME_MAP_TABLE in COUNTERS_DB just like fdbshow. I have create another pull request in Azure/sonic-utilities: Show mac learned on lag interface #730
Updated installation steps Added missing required packages Signed-off-by: Alexandru Banu <Alexandru.Banu@metaswitch.com>
In order to maintain the interface Bridge to be UP all the time,
the dummy interface is needed to be the member of the Bridge.
Refactored test_vlan.py so that each test is independent from
each other and intermediate state will be cleaned up afterwards.
Add test_MultipleVlan test to cover scenarios with VLAN and
VLAN members change. Before the change of the vlanmgrd, this
test would fail when all the VLAN members were removed out of
the master. Interface Bridge would show NO-CARRIER and new
VLAN cannot be created afterwards.
After adding the dummy interface, this test will pass.
Signed-off-by: Shu0T1an ChenG shuche@microsoft.com