sonic-buildimage
sonic-buildimage copied to clipboard
[master][SNMP] Fix config template issue when setting snmpagentaddress
Related to PR#16187
Why I did it
When you configure an SNMP agent address with a VRF, the snmpd service will fail to properly start after the configuration has been applied. The snmpd service shows a status of "FATAL."
sudo config snmpagentaddress add 1.1.1.1 -p 161 -v mgmt
docker exec -it snmp supervisorctl status | awk '{print $1, $2}'
dependent-startup RUNNING
rsyslogd RUNNING
snmp-subagent STOPPED
snmpd FATAL
start EXITED
supervisor-proc-exit-listener RUNNING
Work item tracking
- Microsoft ADO (number only):
How I did it
Corrected syntax in the jinja template used to generate the snmpd.conf within the SNMP docker container.
How to verify it
sudo config snmpagentaddress add 1.1.1.1 -p 161 -v mgmt
docker exec -it snmp supervisorctl status | awk '{print $1, $2}'
dependent-startup EXITED
rsyslogd RUNNING
snmp-subagent RUNNING
snmpd RUNNING
start EXITED
supervisor-proc-exit-listener RUNNING
Which release branch to backport (provide reason below if selected)
- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106
- [ ] 202111
- [ ] 202205
- [ ] 202211
- [ ] 202305
- [x] 202311
- [x] 202405
Tested branch (Please provide the tested image version)
- [x] SONiC.master.634739-2ff111cb9
- [x] SONiC.202405.565256-4d6d808b8
- [x] SONiC-OS-202311.634628-3cc3e1a11
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)
@qiluo-msft Can you please help review? Thanks!
@SuvarnaMeenakshi Can you please review and sign-off?
@brholmes1 , Can you please check checkers failure ? and also comment on the review ?
/azpw run Azure.sonic-buildimage
/AzurePipelines run Azure.sonic-buildimage
Azure Pipelines successfully started running 1 pipeline(s).
Approved, requesting to add a sonic-mgmt test for this.
@qiluo-msft , Can you please merge ?
@brholmes1 can you please add the missing test coverage for this PR by raising another PR? Thanks!
Yes, I will work on adding the missing test coverage and raise a new PR. Thanks!
@kperumalbfn Can you please help cherry-pick this fix to 202411?
@brholmes1 could you add sonic-mgmt tests for this change and let us know. We will include that in 202411 as well. Since we are planning to stabilize 202411, will be good to have the tests included in 202411 as well.
Cherry-pick PR to 202411: https://github.com/sonic-net/sonic-buildimage/pull/21987