-
Notifications
You must be signed in to change notification settings - Fork 713
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
Use device loopback IP address to send SNMP query from neighboring ceos or vsonic #8802
Use device loopback IP address to send SNMP query from neighboring ceos or vsonic #8802
Conversation
Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
loopback ip Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
@SuvarnaMeenakshi can we remove this check now ?
I wanted to make sure it run on multi-asic platforms also. Since we are using loobpack ip i think it should work |
Sure, will test this out on multi-asic and make the change. |
@abdosi this will require additional work as this test is sending snmp query from multi-asic dut to neighbor vsonic.
I will raise a github issue to fix this and enable this test on multi-asic/ |
Raised issue: #8817 |
else: # vsonic neighbour | ||
community = creds['snmp_rocommunity'] | ||
# Use LoopbackIP to query from vsonic neighbor |
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.
In the code comment, could you be more specific about ipv4 or ipv6? #Closed
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.
Fixed
"LOOPBACK_INTERFACE", | ||
{}).get('Loopback0', {}) | ||
for ip in result: | ||
if isinstance(ipaddress.ip_address(ip.split('/')[0]), |
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.
No need to split, you can directly parse ipaddress.ip_network
#Closed
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.
Fixed
"ansible_facts"].get( | ||
"LOOPBACK_INTERFACE", | ||
{}).get('Loopback0', {}) | ||
for ip in result: |
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.
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.
Fixed
Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
from nbr device over loopback ipv4 IP. Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
LGTM, @Pterosaur , can you also confirm? |
lgtm |
Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
The pre-commit check detected issues in the files touched by this pull request. Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
@abdosi modified the macsec/test_interop_protocol.py test_snmp to send SNMP query from neighboring vsonic/ceos devices to SONiC DUT. This way we can have the test running on multi-asic device as well. While testing out on multi-asic device, found that there might be additional changes required. |
@SuvarnaMeenakshi PR conflicts with 202205 branch |
…os or vsonic (sonic-net#8802) What is the motivation for this PR? sonic-net/sonic-buildimage#15487 modifies snmpd in SONiC to listen on management and loopback ip by default instead of listening on any IP. test_interop_protocol.py::test_snmp sends a query to the neighbor device using the link ip address. After the above change to listen on management and loopback ip, the snmp query will fail. Hence, modifying the test to send SNMP query to SONiC DUT from neighboring vsonic/eos using Loopback IP of SONiC DUT. How did you do it? Get loopback IPv4 address DUT and use that to query from neighbor device. Added a generic helped function to send SNMP query to DUT from a neighbor. (cherry picked from commit d66965a)
…oring ceos or vsonic (#8802) (#8972) What is the motivation for this PR? cherry-pick of #8802 sonic-net/sonic-buildimage#15487 modifies snmpd in SONiC to listen on management and loopback ip by default instead of listening on any IP. test_interop_protocol.py::test_snmp sends a query to the neighbor device using the link ip address. After the above change to listen on management and loopback ip, the snmp query will fail. Hence, modifying the test to send SNMP query to SONiC DUT from neighboring vsonic/eos using Loopback IP of SONiC DUT. How did you do it? Get loopback IPv4 address DUT and use that to query from neighbor device. Added a generic helped function to send SNMP query to DUT from a neighbor. (cherry picked from commit d66965a) How did you verify/test it? Tested on single asic VS testbed. Signed-off-by: Suvarna Meenakshi <sumeenak@microsoft.com>
…os or vsonic (sonic-net#8802) What is the motivation for this PR? sonic-net/sonic-buildimage#15487 modifies snmpd in SONiC to listen on management and loopback ip by default instead of listening on any IP. test_interop_protocol.py::test_snmp sends a query to the neighbor device using the link ip address. After the above change to listen on management and loopback ip, the snmp query will fail. Hence, modifying the test to send SNMP query to SONiC DUT from neighboring vsonic/eos using Loopback IP of SONiC DUT. How did you do it? Get loopback IPv4 address DUT and use that to query from neighbor device. Added a generic helped function to send SNMP query to DUT from a neighbor.
Description of PR
Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
sonic-net/sonic-buildimage#15487 modifies snmpd in SONiC to listen on management and loopback ip by default instead of listening on any IP.
test_interop_protocol.py::test_snmp sends a query to the neighbor device using the link ip address.
After the above change to listen on management and loopback ip, the snmp query will fail.
Hence, modifying the test to send SNMP query to SONiC DUT from neighboring vsonic/eos using Loopback IP of SONiC DUT.
How did you do it?
Get loopback IPv4 address DUT and use that to query from neighbor device.
Added a generic helped function to send SNMP query to DUT from a neighbor.
How did you verify/test it?
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation