Skip to content
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

The query result is inconsistent in SNMP #1132

Closed
kaiyu22 opened this issue Nov 9, 2017 · 2 comments
Closed

The query result is inconsistent in SNMP #1132

kaiyu22 opened this issue Nov 9, 2017 · 2 comments

Comments

@kaiyu22
Copy link
Contributor

kaiyu22 commented Nov 9, 2017

Description
There is a phenomenon that query result is inconsistent between snmpd process first start (after booting) and service restart. We can input command 'ps aux' under docker snmp and check snmpd process and its parameters.

In first start:
Debian-+ 29 0.0 0.1 52156 8644 ? S Nov08 0:07 /usr/sbin/snmpd -f -LS4d -u Debian-snmp -g Debian-snmp -I -smux mteTrigger mteTriggerConf ifTable ifXTable inetCidrRouteTable ipCidrRouteTa

Service restart:
Debian-+ 52 0.0 0.0 52016 5544 ? S 03:41 0:00 /usr/sbin/snmpd -Lsd -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux mteTrigger mteTriggerConf -p /run/snmpd.pid

In first start, we can query some OIDs and get the response as below.
(take ifTable for example)

root@sonic:/# snmpwalk -v 2c -c public localhost 1.3.6.1.2.1.2.2
iso.3.6.1.2.1.2.2 = No Such Object available on this agent at this OID

These OIDs are ifTable, ifxTable, ipCidrRouteTa, disk_hw, etc.

After doing the service restart, the above OIDs all can be queried and get the value return.
(take ifTable for example)

root@sonic:/# snmpwalk -v 2c -c public localhost 1.3.6.1.2.1.2.2
iso.3.6.1.2.1.2.2.1.1.1 = INTEGER: 1
iso.3.6.1.2.1.2.2.1.1.2 = INTEGER: 2
... (skip)

Is this what MSFT expected?

Steps to reproduce the issue:

  1. docker exec -it snmp bash
  2. snmpwalk -v 2c -c public localhost 1.3.6.1.2.1.2.2
  3. service snmpd restart
  4. snmpwalk -v 2c -c public localhost 1.3.6.1.2.1.2.2

Describe the results you received:

Describe the results you expected:

Additional information you deem important (e.g. issue happens only occasionally):

**Output of `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
@svc-acs
Copy link
Collaborator

svc-acs commented Nov 9, 2017

we are using supervisord to manage the snmpd process inside snmp docker. Need to use supervisorctl restart snmpd to restart the snmpd process inside the docker.

@kaiyu22
Copy link
Contributor Author

kaiyu22 commented Nov 9, 2017

I got it, thanks for your reply.

@kaiyu22 kaiyu22 closed this as completed Nov 10, 2017
stepanblyschak pushed a commit to stepanblyschak/sonic-buildimage that referenced this issue Dec 20, 2019
9f6efa0 [port/buffer] introduce a sync mechanism to protect port
PG/queue from changes under PFC storm (sonic-net#1143)
823e426 [aclorch] Enable DSCP rules on IPv6 mirror tables (sonic-net#1146)
b8745f8 [bitmap_vnet]: Fix removal flow for tunnel route (sonic-net#1139)
03be983 Increase ip2me CIR/CBR for faster in-band file transfers (sonic-net#1000)
a4a1d3b [vnet]: Update VNET route table size to 40K for BITMAP
implementation (sonic-net#1132)
efe142a Fix bug: Wrong condition for mac address (sonic-net#1142)
7bf63a0 [teammgrd]during warm-reboot teamd need to recover system-id
from saved lacp-pdu (sonic-net#1003)
8b4cfb6 Cleanup configure.ac from BFN specific code (sonic-net#1133)
b931751 [teamsyncd]: Add retry logic in teamsyncd to avoid team handler
init failure (sonic-net#854)

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
lguohan pushed a commit that referenced this issue Dec 27, 2019
9f6efa0 [port/buffer] introduce a sync mechanism to protect port
PG/queue from changes under PFC storm (#1143)
823e426 [aclorch] Enable DSCP rules on IPv6 mirror tables (#1146)
b8745f8 [bitmap_vnet]: Fix removal flow for tunnel route (#1139)
03be983 Increase ip2me CIR/CBR for faster in-band file transfers (#1000)
a4a1d3b [vnet]: Update VNET route table size to 40K for BITMAP
implementation (#1132)
efe142a Fix bug: Wrong condition for mac address (#1142)
7bf63a0 [teammgrd]during warm-reboot teamd need to recover system-id
from saved lacp-pdu (#1003)
8b4cfb6 Cleanup configure.ac from BFN specific code (#1133)
b931751 [teamsyncd]: Add retry logic in teamsyncd to avoid team handler
init failure (#854)

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
abdosi added a commit that referenced this issue Mar 4, 2020
 Enable m_isCombinedMirrorV6Table for BFN platform (#1212)
[vnet]: Update VNET route table size to 40K for BITMAP implementation (#1132)
 Default action for Egress ACL Table not poulated. (#1208)
Add/Del lag_name_map item according to lag adding and removing (#1124)
Increase ip2me CIR/CBR for faster in-band file transfers (#1000)
pphuchar pushed a commit to SONIC-DEV/sonic-buildimage that referenced this issue Mar 9, 2020
 Enable m_isCombinedMirrorV6Table for BFN platform (sonic-net#1212)
[vnet]: Update VNET route table size to 40K for BITMAP implementation (sonic-net#1132)
 Default action for Egress ACL Table not poulated. (sonic-net#1208)
Add/Del lag_name_map item according to lag adding and removing (sonic-net#1124)
Increase ip2me CIR/CBR for faster in-band file transfers (sonic-net#1000)
madhanmellanox pushed a commit to madhanmellanox/sonic-buildimage that referenced this issue Mar 23, 2020
…sonic-net#1132)

Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
tiantianlv pushed a commit to SONIC-DEV/sonic-buildimage that referenced this issue Apr 24, 2020
 Enable m_isCombinedMirrorV6Table for BFN platform (sonic-net#1212)
[vnet]: Update VNET route table size to 40K for BITMAP implementation (sonic-net#1132)
 Default action for Egress ACL Table not poulated. (sonic-net#1208)
Add/Del lag_name_map item according to lag adding and removing (sonic-net#1124)
Increase ip2me CIR/CBR for faster in-band file transfers (sonic-net#1000)
jleveque added a commit that referenced this issue Oct 10, 2020
* src/sonic-utilities 6e58dff...e1244a5 (5):
  > [setup.py] Pin external runtime dependencies at known working versions (#1151)
  > [config] Reload Monit configuration after potential hostname changes (#1132)
  > [NAT]:Updated natshow script to support DNAT Pool changes (#1001)
  > [pfcstat] Create new copies of Rx and Tx dictionaries (#1150)
  > [master]Fix show ip interface neighbor info not correct when add second ip (#1134)
abdosi added a commit that referenced this issue Oct 13, 2020
[pfcstat] Create new copies of Rx and Tx dictionaries (#1150)
[config] Reload Monit configuration after potential hostname
changes (#1132)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
abdosi added a commit that referenced this issue Oct 15, 2020
Updated sonic-util
to fix error done by cherry-pick of PR
[config] Reload Monit configuration after potential hostname changes
(#1132)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-buildimage that referenced this issue Jan 14, 2021
…sonic-net#1132)

Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this issue Feb 25, 2021
* src/sonic-utilities 6e58dff...e1244a5 (5):
  > [setup.py] Pin external runtime dependencies at known working versions (sonic-net#1151)
  > [config] Reload Monit configuration after potential hostname changes (sonic-net#1132)
  > [NAT]:Updated natshow script to support DNAT Pool changes (sonic-net#1001)
  > [pfcstat] Create new copies of Rx and Tx dictionaries (sonic-net#1150)
  > [master]Fix show ip interface neighbor info not correct when add second ip (sonic-net#1134)
stepanblyschak pushed a commit to stepanblyschak/sonic-buildimage that referenced this issue May 10, 2021
…onic-net#1132)

**- What I did**

After hostname changes, we need to reload the Monit configuration in order for Monit to pick up the new system hostname. Otherwise, it will retain the previous hostname.

**- How I did it**

Call `sudo monit reload` after restarting hostname-config.service.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants