-
Notifications
You must be signed in to change notification settings - Fork 113
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
[202012]: snmp vlan support per RFC1213 and added the missing support for RFC2863 #279
Merged
Conversation
This file contains 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
…for RFC2863 (sonic-net#218) - What I did Restored snmp vlan support per RFC1213, which had been reverted due to inconsistency with RFC2863, and added the missing support for RFC2863. Added unit tests for RFC2863. - How I did it Reverted sonic-net#191, which was itself a revert of sonic-net#169. Then added code to support vlan in rfc2863.py and unit tests. Since a long time has elapsed since the original commit and other code has been pushed in the meantime, great care is needed in merging. Note in particular that mibs.init_sync_d_lag_tables now returns five parameters, the last two of which were added: lag_sai_map and sai_lap_map. This PR needs one of those maps, and a concurrent commit supporting RFC4363 needs the other, so all the callers were updated and use the one they need. - How to verify it Unit tests are run via make target/python-wheels/asyncsnmp-2.1.0-py3-none-any.whl. See also Azure#169. - Description for the changelog Restored support for aggregated router interface counters and L3 VLAN counters to RFC1213 MIB, and extended to RFC2863. (cherry picked from commit 266bd15)
…tion" field of PORT_TABLE entries in APPL_DB or CONFIG_DB. (sonic-net#224) - What I did This is a correction of sonic-net#218, which is contained in sonic-net/sonic-buildimage#7859, after community decided that entries under .1.3.6.1.2.1.31.1.1.1.18 OID should return the "description" field of PORT_TABLE entries in APPL_DB or CONFIG_DB. For vlan, management and LAG, these are empty strings. - How I did it Deleted the lines of code quoted by Suvarna in the above PRs. This necessitated modifying 4 unit tests that had been written under the assumption that these OIDs would return non-empty data. - How to verify it Run unit tests in build and snmp tests in sonic-mgmt. - Description for the changelog Entries under .1.3.6.1.2.1.31.1.1.1.18 OID should return the "description" field of PORT_TABLE entries in APPL_DB or CONFIG_DB. Signed-off-by: Raphael Tryster <raphaelt@nvidia.com> (cherry picked from commit 0813b42)
**- What I did** Removed unused variables rif_port_map and port_rif_map in rfc2863.py **- How I did it** Edited rfc2863.py as requested by @qiluo-msft in merged PR sonic-net#218. **- How to verify it** pytest-3 test_interfaces.py and pytest-3 namespace/test_interfaces.py in sonic-snmpagent/tests. **- Description for the changelog** Removed unused variables. (cherry picked from commit a07da53)
Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
|
qiluo-msft
approved these changes
Mar 4, 2023
The PR owner already pass EasyCLA. Since this PR contains cherry-pick of others, who are not active community dev. I will override the checker. |
SuvarnaMeenakshi
added a commit
to SuvarnaMeenakshi/sonic-snmpagent
that referenced
this pull request
Mar 28, 2023
… support for RFC2863 (sonic-net#279)" This reverts commit fba50c6.
qiluo-msft
pushed a commit
that referenced
this pull request
Mar 29, 2023
… support for RFC2863 (#279)" (#280) Reverts #279 seeing the below error after PR 279. This is causing failure of getting InterfacesMIB data: docker exec -ti snmp snmpwalk -v2c -c msft 127.0.0.1 1.3.6.1.2.1.2.2.1.1 iso.3.6.1.2.1.2.2.1.1 = No Such Instance currently exists at this OID ERR snmp#snmp-subagent [ax_interface] ERROR: MIBUpdater.start() caught an unexpected exception during update_data()#012Traceback (most recent call last):#12 File "/usr/local/lib/python3.7/dist-packages/ax_interface/mib.py", line 43, in start#012 self.update_data()#12 File "/usr/local/lib/python3.7/dist-packages/sonic_ax_impl/mibs/ietf/rfc1213.py", line 255, in update_data#012 self.aggregate_counters()#12 File "/usr/local/lib/python3.7/dist-packages/sonic_ax_impl/mibs/ietf/rfc1213.py", line 371, in aggregate_counters#012 self.rif_counters[rif_sai_id][rif_counter_name]#012KeyError: 'SAI_ROUTER_INTERFACE_STAT_IN_ERROR_PACKETS'
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
Cherry-pick the required PRs to 202012 Branch to add SNMP VLAN Support.
This is done because the VLAN if index comes in ipNetToMediaPhysAddress (1.3.6.1.2.1.4.22.1.2) but not in ifName 1.3.6.1.2.1.31.1.1.1.1.
- How I did it
Cherry-pick below PRs:
#218 - Main change
#224 - Follow up PR
#237 - Follow up PR
- How to verify it
Before PR changes:
After PR changes; Can see vlan 1000 with ifindex3000:
UT Passes
- Description for the changelog