From ce7529964932a9fd1cc10ce18dbe11e89ee02223 Mon Sep 17 00:00:00 2001 From: Eric MacDonald Date: Wed, 5 May 2021 19:05:55 -0400 Subject: [PATCH] Fix enabling heartbeat of self from the peer controller This issue only occurs over an hbsAgent process restart where the ready event response does not include the heartbeat start of the peer controller. This update reverts a small code change that was introduced by the following update. https://review.opendev.org/c/starlingx/metal/+/788495 Remove the my_hostname gate introduced at line 1267 of mtcCtrlMsg.cpp because it prevents enabling heartbeat of self by the peer controller. Change-Id: Id72c35f25e2a5231a8a8363a35a81e042f00085e Closes-Bug: 1922584 Signed-off-by: Eric MacDonald --- mtce/src/maintenance/mtcCtrlMsg.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mtce/src/maintenance/mtcCtrlMsg.cpp b/mtce/src/maintenance/mtcCtrlMsg.cpp index a77131f3..5a7be7e9 100755 --- a/mtce/src/maintenance/mtcCtrlMsg.cpp +++ b/mtce/src/maintenance/mtcCtrlMsg.cpp @@ -1263,9 +1263,8 @@ int service_events ( nodeLinkClass * obj_ptr, mtc_socket_type * sock_ptr ) elog ("%s Failed to send inventory to heartbeat service\n", hostname.c_str()); } /* Consider sending the 'start' request to the heartbeat service - * for all enabled hosts except for this active controller. */ - if (( obj_ptr->my_hostname != hostname ) && - ( obj_ptr->get_adminState ( hostname ) == MTC_ADMIN_STATE__UNLOCKED ) && + * for all enabled hosts. */ + if (( obj_ptr->get_adminState ( hostname ) == MTC_ADMIN_STATE__UNLOCKED ) && ( obj_ptr->get_operState ( hostname ) == MTC_OPER_STATE__ENABLED ) && ((obj_ptr->get_availStatus ( hostname ) == MTC_AVAIL_STATUS__AVAILABLE ) || (obj_ptr->get_availStatus ( hostname ) == MTC_AVAIL_STATUS__DEGRADED )))