-
Notifications
You must be signed in to change notification settings - Fork 109
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
Fix: LAG counters, if LAG don't have L3 interface #236
Conversation
@raphaelt-nvidia @stepanblyschak Could you also review? |
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.
Could you please add an explanation, similar to the example above this code, describing the scenario in which the condition you added is required? In other words, how the tables would look different if the LAG has no L3 interface?
For example configuration with vlan trunk on PortChannel
ASIC_DB
No entries in ASIC_STATE:SAI_OBJECT_TYPE_ROUTER_INTERFACE COUNTERS_DB
No entries in COUNTERS_RIF_NAME_MAP/COUNTERS_RIF_TYPE_MAP for PortChannel interface |
I guess that's a bit much to put in code comments. Thanks, LGTM. |
**- What I did** A KeyError exception raised in rfc1213.py if LAG port don't have L3 interface ```` Oct 25 14:10:29.864852 sonic ERR snmp#snmp-subagent [ax_interface] ERROR: SubtreeMIBEntry.__call__() caught an unexpected exception during _callable_.__call__() #012Traceback (most recent call last): sonic-net#12 File "/usr/local/lib/python3.7/dist-packages/ax_interface/mib.py", line 194, in __call__ sonic-net#12 return self._callable_.__call__(sub_id, *self._callable_args) sonic-net#12 File "/usr/local/lib/python3.7/dist-packages/sonic_ax_impl/mibs/ietf/rfc1213.py", line 413, in get_counter sonic-net#12 sai_lag_rif_id = self.port_rif_map[sai_lag_id]#012KeyError: '20000000007c2' ```` **- How I did it** Checked if sai_lag_id is contained in port_rif_map **- How to verify it** Build docker-snmp. No exception is observed.
- What I did
A KeyError exception raised in rfc1213.py if LAG port don't have L3 interface
- How I did it
Checked if sai_lag_id is contained in port_rif_map
- How to verify it
Build docker-snmp. No exception is observed.
- Description for the changelog