Agustin Carranza 8a6171fce0 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
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.

Closes-bug: 2015408

Signed-off-by: Agustin Carranza <agustin.carranza@windriver.com>
Change-Id: Idf5e8717c4f9605a3a7c1eaee1eb87e38bc305e4
2023-04-10 11:32:34 -03:00
2023-03-20 10:44:44 -03:00
2020-10-14 15:42:16 +00:00
2023-01-31 14:10:03 -03:00
2023-01-31 14:10:03 -03:00
2020-10-14 19:37:34 +00:00
2022-12-27 01:46:37 +00:00
Description
StarlingX SNMP App
1.3 MiB
Languages
C 84.4%
Python 8%
Makefile 5.2%
Shell 1.6%
Smarty 0.8%