-
Notifications
You must be signed in to change notification settings - Fork 727
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
[snmp_interfaces] DUT return nothing when using snmp_facts to get IF-MIB information #359
Comments
Would like to know did you face the same issue? |
I fount that the root cause seems to be the parameters of snmp process.
Thus, this test won't be passed because the snmp won't retun data when user querying IF-MIB (has been blocked). HI @stcheng, @maggiemsft, |
@kaiyu22 Thanks, will take a look |
@kaiyu22 The root cause is not true. We purposely disable the implementation of several MIBs inside snmpd because of some issues with interface index, however we provide alternative (maybe partial) implementation in sonic-snmpagent. If you find IF-MIB is not working, the root cause may be outside the snmp docker. |
@kaiyu22 |
Hi @maggiemsft , @qiluo-msft I have found that the key point is the PR #1094, it has fixed the snmp-subagent issue.
My sonic version is older than PR #1094, so the query of IF-MIB is failed. Thanks. |
Close this issue since it had been fixed by PR #1094. |
Description
DUT return nothing when using snmp_facts to get IF-MIB information.
Steps to reproduce the issue:
Loading a minigraph.xml on DUT, I'm using T1 topology(sample)
Run sump_interfaces script by CLI: ansible-playbook test_sonic.yml -i inventory --limit switch2 --become --tags snmp_interfaces -vvvvvv
Get nothing form DUT when using snmp_facts to get IF-MIB information
Describe the results you received:$HOME/.ansible/tmp/ansible-tmp-1511156253.51-280868843475900 )" && echo "$ ( echo $HOME/.ansible/tmp/ansible-tmp-1511156253.51-280868843475900 )" )
TASK [test : Gathering basic snmp facts about the device] **********************
task path: /home/tester/SONiC/Azure/ansible/roles/test/tasks/snmp/interfaces.yml:2
Monday 20 November 2017 13:37:33 +0800 (0:00:00.202) 0:00:31.259 *******
ESTABLISH LOCAL CONNECTION FOR USER: tester
172.20.192.94 EXEC ( umask 22 && mkdir -p "$( echo
172.20.192.94 PUT /tmp/tmpGurYa3 TO /home/tester/.ansible/tmp/ansible-tmp-1511156253.51-280868843475900/snmp_facts
172.20.192.94 EXEC /bin/sh -c 'sudo -H -S -p "[sudo via ansible, key=hjolswgfzuchclflcuhpozpbfjriuwkm] password: " -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-hjolswgfzuchclflcuhpozpbfjriuwkm; LANG=C LC_ALL=C LC_MESSAGES=C /usr/bin/python /home/tester/.ansible/tmp/ansible-tmp-1511156253.51-280868843475900/snmp_facts; rm -rf "/home/tester/.ansible/tmp/ansible-tmp-1511156253.51-280868843475900/" > /dev/null 2>&1'"'"''
ok: [switch2] => {"ansible_facts": {"ansible_ChTotalFreeMemery": 6920820, "ansible_ChTotalMemery": 8165340, "ansible_all_ipv4_addresses": [], "ansible_syscontact": "Azure Cloud Switch vteam linuxnetdev@microsoft.com", "ansible_sysdescr": "SONiC Software Version: SONiC.SONiC-Ingrasys-v1.3.0-437419c - HwSku: INGRASYS-S9100-C32 - Distribution: Debian 8.9 - Kernel: 3.16.0-4-amd64", "ansible_syslocation": "public", "ansible_sysname": "switch2", "ansible_sysobjectid": "1.3.6.1.4.1.8072.3.2.10", "ansible_sysuptime": "959876"}, "changed": false, "invocation": {"module_args": {"authkey": null, "community": "public", "host": "172.20.192.94", "integrity": null, "is_dell": false, "is_ingrasys": false, "level": null, "privacy": null, "privkey": null, "removeplaceholder": null, "username": null, "version": "v2c"}, "module_name": "snmp_facts"}}
TASK [test : set_fact] *********************************************************
task path: /home/tester/SONiC/Azure/ansible/roles/test/tasks/snmp/interfaces.yml:6
Monday 20 November 2017 13:37:34 +0800 (0:00:00.856) 0:00:32.116 *******
ok: [switch2] => {"ansible_facts": {"mg_intf": [], "snmp_intf": []}, "changed": false, "invocation": {"module_args": {"mg_intf": [], "snmp_intf": []}, "module_name": "set_fact"}}
TASK [test : Create snmp interfaces list] **************************************
task path: /home/tester/SONiC/Azure/ansible/roles/test/tasks/snmp/interfaces.yml:10
Monday 20 November 2017 13:37:34 +0800 (0:00:00.106) 0:00:32.222 *******
fatal: [switch2]: FAILED! => {"failed": true, "msg": "ERROR! 'snmp_interfaces' is undefined"}
Describe the results you expected:
DUT should return correct IF-MIB information like sample
Additional information you deem important (e.g. issue happens only occasionally):
root@switch2:/home/admin# show version
SONiC Software Version: SONiC.SONiC-Ingrasys-v1.3.0-437419c
Distribution: Debian 8.9
Kernel: 3.16.0-4-amd64
Build commit: 437419c
Build date: Fri Oct 27 09:02:25 UTC 2017
Built by: sonic@sonic
Docker images:
REPOSITORY TAG IMAGE ID SIZE
docker-syncd-brcm SONiC-Ingrasys-v1.3.0-437419c cdcee25d83a4 318.3 MB
docker-syncd-brcm latest cdcee25d83a4 318.3 MB
docker-orchagent-brcm SONiC-Ingrasys-v1.3.0-437419c fcb06af1a06d 259.1 MB
docker-orchagent-brcm latest fcb06af1a06d 259.1 MB
docker-lldp-sv2 SONiC-Ingrasys-v1.3.0-437419c 71c44d8b4d46 256.5 MB
docker-lldp-sv2 latest 71c44d8b4d46 256.5 MB
docker-dhcp-relay SONiC-Ingrasys-v1.3.0-437419c c5ea6ae37ceb 253.5 MB
docker-dhcp-relay latest c5ea6ae37ceb 253.5 MB
docker-database SONiC-Ingrasys-v1.3.0-437419c e38cab48359e 251.7 MB
docker-database latest e38cab48359e 251.7 MB
docker-snmp-sv2 SONiC-Ingrasys-v1.3.0-437419c 97e0ae330326 291.3 MB
docker-snmp-sv2 latest 97e0ae330326 291.3 MB
docker-teamd SONiC-Ingrasys-v1.3.0-437419c 44ef14751dc7 256.1 MB
docker-teamd latest 44ef14751dc7 256.1 MB
docker-platform-monitor SONiC-Ingrasys-v1.3.0-437419c af75bbc58bf1 271 MB
docker-platform-monitor latest af75bbc58bf1 271 MB
docker-fpm-quagga SONiC-Ingrasys-v1.3.0-437419c 3b724be6ed5f 262.7 MB
docker-fpm-quagga latest 3b724be6ed5f 262.7 MB
The text was updated successfully, but these errors were encountered: