After running a swact command, the snmp pod crashed and generated a
coredump. That behavior was due to an invalid reference for the DB
handler.
This change adds a new function to renew the session after the
first failure (this happens after swact) in the connection.
During the retries, the session in renewed and the reference is
restored. So the coredump is now avoided.
Test plan
PASS: * Deploy a multinode configuration (e.g. AIO-DX).
* Install the SNMP application.
* Perform a snmpget/snmpwalk/snmpbulk operation related to FM,
to the floating IP, e.g. WRS-ALARM-MIB::wrsAlarmActiveAlarmId.1
* Perform a swact operation.
* Repeat the snmp operation.
* Both operations succeed and no coredumps are found in the filesystem of all controllers.
Reviewed: https:/ /review. opendev. org/c/starlingx /snmp-armada- app/+/879689 /opendev. org/starlingx/ snmp-armada- app/commit/ 8a6171fce0abdc8 4fc1488bb78b40a 5046fdc4ef
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 8a6171fce0abdc8 4fc1488bb78b40a 5046fdc4ef
Author: Agustin Carranza <email address hidden>
Date: Wed Apr 5 17:23:15 2023 -0300
Refresh DB session after swact in fm-subagent
After running a swact command, the snmp pod crashed and generated a
coredump. That behavior was due to an invalid reference for the DB
handler.
This change adds a new function to renew the session after the
first failure (this happens after swact) in the connection.
During the retries, the session in renewed and the reference is
restored. So the coredump is now avoided.
Test plan snmpwalk/ snmpbulk operation related to FM, MIB::wrsAlarmAc tiveAlarmId. 1
filesystem of all controllers.
PASS: * Deploy a multinode configuration (e.g. AIO-DX).
* Install the SNMP application.
* Perform a snmpget/
to the floating IP, e.g. WRS-ALARM-
* Perform a swact operation.
* Repeat the snmp operation.
* Both operations succeed and no coredumps are found in the
Closes-bug: 2015408
Signed-off-by: Agustin Carranza <email address hidden> 5a3a7c1eaee1eb8 7e38bc305e4
Change-Id: Idf5e8717c4f960