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

Add router interface should remove vlan/lag member first. #1834

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add router interface should remove vlan/lag member first. #1834

wants to merge 1 commit into from

Conversation

iris00522
Copy link
Contributor

@iris00522 iris00522 commented Jul 22, 2021

What I did
if port member not remove from vlan/lag then return false when add router interface.

Why I did it
error log

Jun 26 10:10:28.658424 as5835-54x NOTICE swss#orchagent: :- setPortPvid: Set pvid 1 to port: Ethernet2
Jun 26 10:10:28.658424 as5835-54x NOTICE swss#orchagent: :- flushFdbByPortVlan: port Ethernet2 vlan Vlan1000
Jun 26 10:10:28.659304 as5835-54x NOTICE swss#orchagent: :- setHostIntfsStripTag: Set SAI_HOSTIF_VLAN_TAG_STRIP to host interface: Ethernet2
Jun 26 10:10:28.661253 as5835-54x NOTICE swss#orchagent: :- removeBridgePort: Remove bridge port Ethernet2 from default 1Q bridge
Jun 26 10:10:28.669330 as5835-54x NOTICE swss#orchagent: :- addRouterIntfs: Create router interface Ethernet2 MTU 9100
Jun 26 10:10:28.677001 as5835-54x NOTICE swss#orchagent: :- addRouterIntfs: Create router interface Ethernet3 MTU 9100
Jun 26 10:10:28.769320 as5835-54x NOTICE swss#orchagent: :- removeVlanMember: Remove member Ethernet3  from VLAN Vlan1000 lid:3e8 vmid:27000000000c27
Jun 26 10:10:28.769320 as5835-54x NOTICE swss#orchagent: :- setPortPvid: pvid setting for router interface Ethernet3 is not allowed
Jun 26 10:10:28.769399 as5835-54x ERR swss#orchagent: :- meta_sai_validate_oid: object key SAI_OBJECT_TYPE_VLAN_MEMBER:oid:0x27000000000c27 doesn't exist
Jun 26 10:10:28.769442 as5835-54x ERR swss#orchagent: :- removeVlanMember: Failed to remove member Ethernet3 from VLAN Vlan1000 vid:3e8 vmid:27000000000c27

How I verified it
retry and check the syslog

Jul  5 03:59:30.971342 as4630-54pe-2 WARNING swss#orchagent: :- addRouterIntfs: It's vlan member PortChannel1
Jul  5 03:59:31.032876 as4630-54pe-2 INFO syncd#syncd: [none] _brcm_sai_vxlan_acc_port_trunk_settings:897 tid 4
Jul  5 03:59:31.036720 as4630-54pe-2 WARNING swss#orchagent: :- addRouterIntfs: It's vlan member PortChannel1
Jul  5 03:59:31.036720 as4630-54pe-2 NOTICE swss#orchagent: :- removeVlanMember: Remove member PortChannel1 from VLAN Vlan1000 lid:3e8 vmid:27000000000d8e
Jul  5 03:59:31.044600 as4630-54pe-2 INFO syncd#syncd: [none] update_match_port_rule:403 check port: c000004 and flow_port: 0 
Jul  5 03:59:31.049949 as4630-54pe-2 NOTICE swss#orchagent: :- setPortPvid: Set pvid 1 to lag: PortChannel1
Jul  5 03:59:31.049949 as4630-54pe-2 NOTICE swss#orchagent: :- flushFdbByPortVlan: port PortChannel1 vlan Vlan1000
Jul  5 03:59:31.055726 as4630-54pe-2 NOTICE swss#orchagent: :- setHostIntfsStripTag: Set SAI_HOSTIF_VLAN_TAG_STRIP to host interface: Ethernet2
Jul  5 03:59:31.058325 as4630-54pe-2 NOTICE swss#orchagent: :- setHostIntfsStripTag: Set SAI_HOSTIF_VLAN_TAG_STRIP to host interface: Ethernet3
Jul  5 03:59:31.060993 as4630-54pe-2 NOTICE swss#orchagent: :- removeBridgePort: Remove bridge port PortChannel1 from default 1Q bridge
Jul  5 03:59:31.069849 as4630-54pe-2 NOTICE swss#orchagent: :- addRouterIntfs: Create router interface PortChannel1 MTU 9100
Jul  5 03:59:31.189081 as4630-54pe-2 NOTICE syncd#syncd: :- setRifCounterList: Router interface oid:0x4100600001008 does not have supported counters

@iris00522 iris00522 requested a review from prsunny as a code owner July 22, 2021 09:23
@prsunny
Copy link
Collaborator

prsunny commented Jul 23, 2021

How did you simulate this issue? if its via CLI, I thought we've checks before assigning IP address to a port.

EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
Support code diff coverage

Support to add the pull request checks for Code diff coverage in GitHub.
Support to display the code diff coverage html report in Azure Pipelines.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants