From 76addb37b281fccf1e39bbebcd6bec88bfb4c362 Mon Sep 17 00:00:00 2001 From: Eric MacDonald Date: Fri, 3 Jan 2020 14:28:28 -0500 Subject: [PATCH] Fix MNFA timer timeout condition check A timer module change made in https://review.opendev.org/#/c/698311 introduced a change that makes all unstarted/stopped timers appear as expired/rung. A MNFA (Multi Node Failure Avoidance) timeout of zero represents no timeout and is implemented by not starting a timer for that condition. However, due to the recent change, that makes the MNFA timer expiry check succeed immediatly causing MNFA to exit prematurely causing the issue reported by the Bug reference. The fix is to condition the timer expiry check with a non-zero MNFA timeout value. Test Plan: PASS: Verify MNFA handling with and without timeout. PASS: Verify 3 node MNFA handling due to node power cycle PASS: Verify 2 node MNFA handling and recovery due to cable pull Change-Id: I97363cd309f786b3d41288667d4378b91e4a0d23 Closes-Bug: 1858216 Signed-off-by: Eric MacDonald (cherry picked from commit e86d0b915896b74cb6956d93e99b5dd308271e80) --- mtce/src/maintenance/mtcNodeFsm.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mtce/src/maintenance/mtcNodeFsm.cpp b/mtce/src/maintenance/mtcNodeFsm.cpp index c080a6b9..38aee7cd 100755 --- a/mtce/src/maintenance/mtcNodeFsm.cpp +++ b/mtce/src/maintenance/mtcNodeFsm.cpp @@ -41,8 +41,8 @@ int nodeLinkClass::fsm ( struct nodeLinkClass::node * node_ptr ) return FAIL ; } - /* if the multi-Node-Failure Avoidance timer rang then run its ecovery handler */ - if ( mtcTimer_mnfa.ring == true ) + /* if the multi-Node-Failure Avoidance timer rang then run its recovery handler */ + if (( this->mnfa_timeout != 0 ) && ( mtcTimer_mnfa.ring == true )) { mtcTimer_mnfa.ring = false ; mnfa_exit ( true );