-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[SFLOW] [error log] ERR sflow#port_index_mapper: no interface with this name #11437
Comments
https://github.com/Azure/sonic-buildimage/blob/master/dockers/docker-sflow/port_index_mapper.py#L48 need be improved to handle this situation. |
Another error log in the same test and same module: |
@venkatmahalingam could you please update when this issue can be fixed for 202211 and 202205? |
@padmanarayana Please comment on this issue. |
@Gokulnath-Raja is working on this issue. |
Raised pull request #13567 |
catch system error and log as warning level instead of error level in case interface was already deleted Signed-off-by: Gokulnath-Raja <Gokulnath_R@dell.com>
catch system error and log as warning level instead of error level in case interface was already deleted. Why I did it sflow process exited when failed to convert the interface index from interface name How I did it Added exception handling code and logged when OSError exception. How to verify it Recreated the bug scenario #11437 and ensured that sflow process not exited. Description for the changelog catch system error and log as warning level instead of error level in case interface was already deleted. Logs steps : root@sonic:~# sudo config vlan member del 4094 PortChannel0001 root@sonic:~# sudo config vlan member del 4094 Ethernet2 root@sonic:~# sudo config vlan del 4094 root@sonic:~# "WARNING sflow#port_index_mapper: no interface with this name" is seen but no crash is reported syslogs : Jan 23 09:17:24.420448 sonic NOTICE swss#orchagent: :- removeVlanMember: Remove member Ethernet2 from VLAN Vlan4094 lid:ffe vmid:27000000000a53 Jan 23 09:17:24.420710 sonic NOTICE swss#orchagent: :- flushFdbEntries: flush key: SAI_OBJECT_TYPE_FDB_FLUSH:oid:0x21000000000000, fields: 3 Jan 23 09:17:24.420847 sonic NOTICE swss#orchagent: :- recordFlushFdbEntries: flush key: SAI_OBJECT_TYPE_FDB_FLUSH:oid:0x21000000000000, fields: 3 Jan 23 09:17:24.426082 sonic NOTICE syncd#syncd: :- processFdbFlush: fdb flush succeeded, updating redis database Jan 23 09:17:24.426242 sonic NOTICE syncd#syncd: :- processFlushEvent: received a flush port fdb event, portVid = oid:0x3a000000000a52, bvId = oid:0x26000000000a51 Jan 23 09:17:24.426374 sonic NOTICE syncd#syncd: :- processFlushEvent: pattern ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:*oid:0x26000000000a51*, portStr oid:0x3a000000000a52 Jan 23 09:17:24.427104 sonic NOTICE bgp#fpmsyncd: :- onRouteMsg: RouteTable del msg for route with only one nh on eth0/docker0: fe80::/64 :: eth0 Jan 23 09:17:24.427182 sonic NOTICE bgp#fpmsyncd: :- onRouteMsg: RouteTable del msg for route with only one nh on eth0/docker0: fd00::/80 :: docker0 Jan 23 09:17:24.428502 sonic NOTICE swss#orchagent: :- meta_sai_on_fdb_flush_event_consolidated: processing consolidated fdb flush event of type: SAI_FDB_ENTRY_TYPE_DYNAMIC Jan 23 09:17:24.429058 sonic NOTICE swss#orchagent: :- meta_sai_on_fdb_flush_event_consolidated: fdb flush took 0.000606 sec Jan 23 09:17:24.431496 sonic NOTICE swss#orchagent: :- setHostIntfsStripTag: Set SAI_HOSTIF_VLAN_TAG_STRIP to host interface: Ethernet2 Jan 23 09:17:24.431675 sonic NOTICE swss#orchagent: :- flushFdbEntries: flush key: SAI_OBJECT_TYPE_FDB_FLUSH:oid:0x21000000000000, fields: 2 Jan 23 09:17:24.431797 sonic NOTICE swss#orchagent: :- recordFlushFdbEntries: flush key: SAI_OBJECT_TYPE_FDB_FLUSH:oid:0x21000000000000, fields: 2 Jan 23 09:17:24.437009 sonic NOTICE swss#orchagent: :- meta_sai_on_fdb_flush_event_consolidated: processing consolidated fdb flush event of type: SAI_FDB_ENTRY_TYPE_DYNAMIC Jan 23 09:17:24.437532 sonic NOTICE swss#orchagent: :- meta_sai_on_fdb_flush_event_consolidated: fdb flush took 0.000514 sec Jan 23 09:17:24.437942 sonic NOTICE syncd#syncd: :- processFdbFlush: fdb flush succeeded, updating redis database Jan 23 09:17:24.438065 sonic NOTICE syncd#syncd: :- processFlushEvent: received a flush port fdb event, portVid = oid:0x3a000000000a52, bvId = oid:0x0 Jan 23 09:17:24.438173 sonic NOTICE syncd#syncd: :- processFlushEvent: pattern ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:*, portStr oid:0x3a000000000a52 Jan 23 09:17:24.440348 sonic NOTICE swss#orchagent: :- removeBridgePort: Remove bridge port Ethernet2 from default 1Q bridgeJan 23 09:17:29.782554 sonic NOTICE swss#orchagent: :- removeVlan: VLAN Vlan4094 still has 1 FDB entries Jan 23 09:17:29.791373 sonic WARNING sflow#port_index_mapper: no interface with this name Signed-off-by: Gokulnath-Raja <Gokulnath_R@dell.com>
catch system error and log as warning level instead of error level in case interface was already deleted Signed-off-by: Gokulnath-Raja <Gokulnath_R@dell.com>
catch system error and log as warning level instead of error level in case interface was already deleted Signed-off-by: Gokulnath-Raja <Gokulnath_R@dell.com>
https://msazure.visualstudio.com/One/_workitems/edit/17813211 Related work items: sonic-net#9216, sonic-net#11437, sonic-net#13507, sonic-net#13512, sonic-net#13567, sonic-net#13972, sonic-net#14351, sonic-net#14371, sonic-net#14375, sonic-net#14401, sonic-net#14407, sonic-net#14408, sonic-net#14427, sonic-net#14428, sonic-net#14439
Description
When I enable SFLOW configuration as background configuration which is existing with other configuration, such as vlan and port.
Vlan deletion could trigger sflow error log - ERR sflow#port_index_mapper: no interface with this name
One of my colleague had some investigation on this issue, I hope it could provide some advantage.
_Failing at this line https://github.com/Azure/sonic-buildimage/blob/master/dockers/docker-sflow/port_index_mapper.py#L48
Method call to "socket" python library which means the given interface doesn't exist when this call is made
Based on the syslog this failed directly after the following command was run:
sudo config vlan del 4094
Its likely that the host interface is removed before sflow processes the removal.
This should be resolved in sflow to make it tolerant of this particular deletion flow._
Steps to reproduce the issue:
sudo config portchannel add PortChannel0001
sudo config portchannel member add PortChannel0001 Ethernet0
sudo config feature state sflow enabled
sudo config sflow enable
sudo config sflow collector add collector0 50.0.0.2 --port 6343 --vrf default
sudo config sflow interface disable all
sudo config sflow interface enable Ethernet0
sudo config sflow interface enable Ethernet28
sudo config vlan add 4095
sudo config vlan member del 30 PortChannel0001
sudo config vlan member add --untagged 4095 PortChannel0001
sudo config vlan member add 4095 Ethernet40
sudo config vlan add 4094
sudo config vlan member add --untagged 4094 PortChannel0001
sudo config vlan member add 4094 Ethernet40
sudo config vlan member del 4094 PortChannel0001
sudo config vlan member del 4094 Ethernet40
sudo config vlan del 4094
sudo config vlan member add --untagged 30 PortChannel0001
Describe the results you received:
In the system log of sonic switch, one sflow error log could be catched:
ERR sflow#port_index_mapper: no interface with this name
Describe the results you expected:
There should be no sflow error log
Output of
show version
:Output of
show techsupport
:Additional information you deem important (e.g. issue happens only occasionally):
The text was updated successfully, but these errors were encountered: