Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

stcheng
Copy link
Contributor

@stcheng stcheng commented Dec 13, 2018

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

@stcheng
Copy link
Contributor Author

stcheng commented Dec 13, 2018

@zhenggen-xu

@stcheng
Copy link
Contributor Author

stcheng commented Dec 13, 2018

this is for 201803 branch

// /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"
Copy link
Collaborator

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"

+ 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\"";
Copy link
Collaborator

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>
@stcheng
Copy link
Contributor Author

stcheng commented Dec 18, 2018

@zhenggen-xu updated

@zhenggen-xu
Copy link
Collaborator

@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!

@chenkelly
Copy link

Hi @stcheng and @zhenggen-xu
do you plan to put this solution to branch 201904? Thanks.

@stcheng
Copy link
Contributor Author

stcheng commented Aug 7, 2019

addressed by @jipanyang

@stcheng stcheng closed this Aug 7, 2019
@stcheng stcheng deleted the dummy-201803 branch August 7, 2019 00:05
@chenkelly
Copy link

Hi all
Which PR fix the issue?
Thanks very much

@stcheng
Copy link
Contributor Author

stcheng commented Aug 7, 2019

@chenkelly #1001 please check this one

lguohan added a commit that referenced this pull request Mar 4, 2020
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
abdosi pushed a commit that referenced this pull request Mar 4, 2020
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
yxieca pushed a commit that referenced this pull request Apr 3, 2020
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
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-swss that referenced this pull request Mar 1, 2023
Updated installation steps
Added missing required packages

Signed-off-by: Alexandru Banu <Alexandru.Banu@metaswitch.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants