sonic-buildimage/dockers
SuvarnaMeenakshi 90dc254656
[SNMP]: Modify minigraph parser to update SNMP_AGENT_ADDRESS_CONFIG table (#17045)
#### Why I did it
SNMP query over IPv6 does not work due to issue in net-snmp where IPv6 query does not work on multi-nic environment.
To get around this, if snmpd listens on specific ipv4 or ipv6 address, then the issue is not seen.
We plan to configure Management IP and Loopback IP configured in minigraph.xml as SNMP_AGENT_ADDRESS in config_db., based on changes discussed in https://github.com/sonic-net/SONiC/pull/1457.

##### Work item tracking
- Microsoft ADO **(number only)**:26091228

#### How I did it
Modify minigraph parser to update SNMP_AGENT_ADDRESS_CONFIG with management and Loopback0 IP addresses.
Modify snmpd.conf.j2 to use SNMP_AGENT_ADDRESS_CONFIG table if it is present in config_db, if not listen on any IP.
Main change:
1. if minigraph.xml is used to configure the device, then snmpd will listen on mgmt and loopback IP addresses,
2. if config_db is used to configure the device, snmpd will listen IP present in SNMP_AGENT_ADDRESS_CONFIG  if that table is present, if table is not present snmpd will listen on any IP.
#### How to verify it
config_db.json created from minigraph.xml for single asic VS image with mgmt and Loopback IP addresses.
```
    "SNMP_AGENT_ADDRESS_CONFIG": {
        "10.1.0.32|161|": {},
        "10.250.0.101|161|": {},
        "FC00:1::32|161|": {},
        "fec0::ffff:afa:1|161|": {}
    },
 .....
 
 snmpd listening on the above IP addresses:
 admin@vlab-01:~$ sudo netstat -tulnp | grep 161
tcp        0      0 127.0.0.1:3161          0.0.0.0:*               LISTEN      71522/snmpd         
udp        0      0 10.250.0.101:161        0.0.0.0:*                           71522/snmpd         
udp        0      0 10.1.0.32:161           0.0.0.0:*                           71522/snmpd         
udp6       0      0 fec0::ffff:afa:1:161    :::*                                71522/snmpd         
udp6       0      0 fc00:1::32:161          :::*                                71522/snmpd  
```
2023-12-06 13:23:02 -08:00
..
docker-base Improve remote fetch (#12795) 2023-09-23 18:07:04 -07:00
docker-base-bullseye [VOQ][saidump] Install rdbtools into the docker base related containers. (#16466) 2023-11-08 11:57:25 -08:00
docker-base-buster Improve remote fetch (#12795) 2023-09-23 18:07:04 -07:00
docker-base-stretch Improve remote fetch (#12795) 2023-09-23 18:07:04 -07:00
docker-basic_router [supervisord]: use abspath as supervisord entrypoint (#5995) 2020-11-22 21:18:44 -08:00
docker-config-engine Install python-redis package to docker containers (#14632) 2023-04-19 18:14:48 -07:00
docker-config-engine-bullseye Load generic omprog in all dockers for rsyslog plugin support (#16601) 2023-09-20 16:27:42 -07:00
docker-config-engine-buster [Build] Fix the PyYang python package installation issue (#15890) 2023-07-19 06:33:49 +08:00
docker-config-engine-stretch Install python-redis package to docker containers (#14632) 2023-04-19 18:14:48 -07:00
docker-database [docker-database-init.sh]: Fix wrong creating of database_global.json in multi asic platform (#17221) 2023-11-21 09:41:20 -08:00
docker-dhcp-relay [dhcp_relay] Use dhcprelayd to manage critical processes (#17236) 2023-11-27 09:30:01 -08:00
docker-dhcp-server [dhcp_server] Add show dhcp_server ipv4 lease (#17125) 2023-11-21 08:42:07 -08:00
docker-eventd Timezone sync issue between the host and containers (#14000) 2023-06-25 16:36:09 -07:00
docker-fpm-frr [frr]: Force disable next hop group support. (#17344) 2023-12-06 11:09:54 +08:00
docker-fpm-gobgp Parallel building of sonic dockers using native dockerd(dood). (#10352) 2022-04-28 08:39:37 +08:00
docker-iccpd Timezone sync issue between the host and containers (#14000) 2023-06-25 16:36:09 -07:00
docker-lldp Timezone sync issue between the host and containers (#14000) 2023-06-25 16:36:09 -07:00
docker-macsec Update macsec CAK keys in profile for tests to change to type7 encoded format (#16388) 2023-09-06 21:11:02 -07:00
docker-mux Timezone sync issue between the host and containers (#14000) 2023-06-25 16:36:09 -07:00
docker-nat Timezone sync issue between the host and containers (#14000) 2023-06-25 16:36:09 -07:00
docker-orchagent Add pensando platform (#15978) 2023-12-04 14:41:52 -08:00
docker-pde [infra] Support syslog rate limit configuration (#12490) 2022-12-20 10:53:58 +02:00
docker-platform-monitor [pmon] update gRPC version to 1.57.0 (#16257) 2023-09-15 16:41:51 -07:00
docker-ptf Upgrade gnxi to support dash (#16498) 2023-09-08 08:56:51 -07:00
docker-ptf-sai [build] Fix build issue in docker-ptf-sai caused by setuptools_scm new release (#16636) 2023-09-21 10:38:08 -07:00
docker-router-advertiser Timezone sync issue between the host and containers (#14000) 2023-06-25 16:36:09 -07:00
docker-sflow Timezone sync issue between the host and containers (#14000) 2023-06-25 16:36:09 -07:00
docker-snmp [SNMP]: Modify minigraph parser to update SNMP_AGENT_ADDRESS_CONFIG table (#17045) 2023-12-06 13:23:02 -08:00
docker-sonic-gnmi Share image for gnmi and telemetry (#16863) 2023-11-08 08:54:36 +08:00
docker-sonic-mgmt [Snappi] Update snappi module on sonic-mgmt docker (#17269) 2023-11-30 21:33:00 -08:00
docker-sonic-mgmt-framework Fix docker-sonic-mgmt-framework for armhf 2023-11-21 18:53:15 -08:00
docker-sonic-p4rt Timezone sync issue between the host and containers (#14000) 2023-06-25 16:36:09 -07:00
docker-sonic-restapi [infra] Support syslog rate limit configuration (#12490) 2022-12-20 10:53:58 +02:00
docker-sonic-sdk [Bullseye] Upgrade sonic-sdk image to bullseye (#12649) 2022-11-28 18:57:26 +02:00
docker-sonic-sdk-buildenv Parallel building of sonic dockers using native dockerd(dood). (#10352) 2022-04-28 08:39:37 +08:00
docker-sonic-telemetry Share image for gnmi and telemetry (#16863) 2023-11-08 08:54:36 +08:00
docker-swss-layer-bullseye Add ping to swss-layer docker (#11093) 2022-06-10 07:40:37 -07:00
docker-swss-layer-buster Add ping to swss-layer docker (#11093) 2022-06-10 07:40:37 -07:00
docker-teamd Timezone sync issue between the host and containers (#14000) 2023-06-25 16:36:09 -07:00
dockerfile-macros.j2 [sonic-config-engine] Clean up dependencies, pin versions; install Python 3 package in Buster container (#5656) 2020-10-26 13:48:50 -07:00