fault/fm-common/sources
Takamasa Takenaka 8bd6e5b92d Validate fm manager socket fd before send a message
When fm manager is restarted, there is no mechanism to detect it
from fm api client side. As a result, when subcloud delete clear
alarm request is sent after fm manager is restarted, fm api client
will show broke pipe and clear alarm request is not received and
this alarm stays.

This fix is to check socket fd state before send/receive from
fm api client. If broken pipe is detected, it will try to
reconnect to fm manager.

Closes-bug: 2039684

Test Plan:
PASS: Restart fm manager and confirm that detect broken pipe
      and reconnect messages in /var/log. For example,
-----
sm: err fmSocket.cpp(270): A broken pipe error occurred
sm: warning fmAPI.cpp(116): Invalid file descriptor. Atte
mpting to reconnect...
sm: info fmAPI.cpp(149): Connected to FM Manager.
-----
PASS: Delete offline subcloud and confirm the alarm is
      removed.

Change-Id: Ibc0f4d96b5c0a385d8fedbc1acd23898f1cbea46
Signed-off-by: Takamasa Takenaka <takamasa.takenaka@windriver.com>
2023-10-19 15:18:17 -03:00
..
LICENSE StarlingX open source release updates 2018-05-31 07:36:00 -07:00
Makefile Restrict fmClientCli binary permissions 2022-09-28 11:19:55 -03:00
fmAPI.cpp Validate fm manager socket fd before send a message 2023-10-19 15:18:17 -03:00
fmAPI.h Fix indentation and style issues in fmAPI 2019-08-22 10:53:15 -05:00
fmAlarm.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmAlarmUtils.cpp Fix indentation and style issues in fmAlarmUtils 2019-09-17 00:22:37 -05:00
fmAlarmUtils.h Fix indentation and style issues in fmAlarmUtils 2019-09-17 00:22:37 -05:00
fmConfig.cpp Update FM Manager old net-snmp related code 2020-12-17 10:03:38 -03:00
fmConfig.h Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmConstants.h Reimplementation logic for trap generation 2020-12-08 18:37:50 -03:00
fmDb.cpp Fix clear_fault/clear_all in FaultAPIsV2 raise exception when alarm is 2019-04-01 01:31:49 +08:00
fmDb.h Fix clear_fault/clear_all in FaultAPIsV2 raise exception when alarm is 2019-04-01 01:31:49 +08:00
fmDbAPI.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmDbAlarm.cpp Fix clear_fault/clear_all in FaultAPIsV2 raise exception when alarm is 2019-04-01 01:31:49 +08:00
fmDbAlarm.h Fix clear_fault/clear_all in FaultAPIsV2 raise exception when alarm is 2019-04-01 01:31:49 +08:00
fmDbEventLog.cpp replace strncpy by snprintf 2018-11-03 00:56:57 +08:00
fmDbEventLog.h Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmDbUtils.cpp Fixing logging for python scripts - FM 2021-12-23 14:49:21 -03:00
fmDbUtils.h Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmEventSuppression.cpp Fix clear_fault/clear_all in FaultAPIsV2 raise exception when alarm is 2019-04-01 01:31:49 +08:00
fmEventSuppression.h Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmFile.cpp StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmFile.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmLog.cpp Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmLog.h Decouple Fault Management from stx-config 2018-08-16 13:23:33 -04:00
fmMsg.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmMsgServer.cpp Fix clear_fault/clear_all in FaultAPIsV2 raise exception when alarm is 2019-04-01 01:31:49 +08:00
fmMsgServer.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmMutex.cpp StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmMutex.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmSnmpConstants.h Add missing fields for Event traps 2023-08-31 12:01:35 -03:00
fmSnmpUtils.cpp Add missing fields for Event traps 2023-08-31 12:01:35 -03:00
fmSnmpUtils.h Update FM Manager old net-snmp related code 2020-12-17 10:03:38 -03:00
fmSocket.cpp Validate fm manager socket fd before send a message 2023-10-19 15:18:17 -03:00
fmSocket.h Validate fm manager socket fd before send a message 2023-10-19 15:18:17 -03:00
fmThread.cpp StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmThread.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fmTime.cpp Fix zuul jobs broken due to pip upversion 2020-12-18 08:41:07 -06:00
fmTime.h StarlingX open source release updates 2018-05-31 07:36:00 -07:00
fm_cli.cpp Fix indentation and style issues in fm_cli 2019-09-16 23:35:47 -05:00
fm_db_sync_event_suppression.py Support newer version of yaml 2023-05-31 16:36:27 +00:00
fm_log.py Use alternate log handler if running in container 2021-11-19 10:07:36 -03:00
fm_python_mod_main.cpp Fix python3.9 building 2021-09-21 17:37:48 +00:00
requirements.txt Use DevStack's setup_*() functions for Python packages 2019-05-17 13:11:58 -05:00
setup.cfg Use DevStack's setup_*() functions for Python packages 2019-05-17 13:11:58 -05:00
setup.py Add hooks for python wheel generation 2018-10-24 17:12:50 +00:00