Fix: LAG counters, if LAG don't have L3 interface#236
Merged
qiluo-msft merged 1 commit intosonic-net:masterfrom Mar 11, 2022
Merged
Fix: LAG counters, if LAG don't have L3 interface#236qiluo-msft merged 1 commit intosonic-net:masterfrom
qiluo-msft merged 1 commit intosonic-net:masterfrom
Conversation
Contributor
|
@raphaelt-nvidia @stepanblyschak Could you also review? |
qiluo-msft
approved these changes
Oct 26, 2021
Contributor
Author
|
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 |
Contributor
|
I guess that's a bit much to put in code comments. Thanks, LGTM. |
lukasstockner
pushed a commit
to genesiscloud/sonic-snmpagent
that referenced
this pull request
Jun 13, 2022
**- 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.
ssithaia-ebay
pushed a commit
to ssithaia-ebay/sonic-snmpagent
that referenced
this pull request
May 23, 2025
**- 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- 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