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 <eric.macdonald@windriver.com>
This commit is contained in:
Eric MacDonald 2021-05-05 19:05:55 -04:00
parent 48978d804d
commit ce75299649
1 changed files with 2 additions and 3 deletions

View File

@ -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()); elog ("%s Failed to send inventory to heartbeat service\n", hostname.c_str());
} }
/* Consider sending the 'start' request to the heartbeat service /* Consider sending the 'start' request to the heartbeat service
* for all enabled hosts except for this active controller. */ * for all enabled hosts. */
if (( obj_ptr->my_hostname != hostname ) && if (( obj_ptr->get_adminState ( hostname ) == MTC_ADMIN_STATE__UNLOCKED ) &&
( obj_ptr->get_adminState ( hostname ) == MTC_ADMIN_STATE__UNLOCKED ) &&
( obj_ptr->get_operState ( hostname ) == MTC_OPER_STATE__ENABLED ) && ( 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__AVAILABLE ) ||
(obj_ptr->get_availStatus ( hostname ) == MTC_AVAIL_STATUS__DEGRADED ))) (obj_ptr->get_availStatus ( hostname ) == MTC_AVAIL_STATUS__DEGRADED )))