Force heartbeat period reset on mtcAgent process startup
In the case of a Multi Node Failure Avoidance (MNFA) event, mtcAgent (Maintenance) sends a 'back-off' request to the hbsAgent (Heartbeat) while there appears to be a networking issue that affects a number of hosts. This 'back-off' request tells the heartbeat service to slow down by a factor of 4; what was say a 100 ms period would change to a 400 ms period while in MNFA mode. When the MNFA condition resolves the mtcAgent sends a heartbeat 'recovery' command to the heartbeat service telling it to restore the heartbeat interval back the configured interval. However, if the mtcAgent process is 'restarted' while in MNFA mode, the knowledge that the heartbeat service was running at a reduced rate is lost and not restored. This update forces the heartbeat rate to be set back to the configured rate when the mtcAgent starts up. Note that MNFA mode is not and should not be preserved over mtcAgent process restart. If after restart a MNFA event. Change-Id: I254ef86c453cb2d40cbeda859bd7477ac28942bc Closes-Bug: 1884556 Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
This commit is contained in:
parent
240773cf5d
commit
4267d46786
|
@ -85,8 +85,6 @@ int mtc_service_inbox ( nodeLinkClass * obj_ptr,
|
|||
mtc_socket_type * sock_ptr,
|
||||
int interface );
|
||||
|
||||
string my_hostname = "" ;
|
||||
|
||||
/** Instanciate the NodeLinkClass and pointer to it */
|
||||
nodeLinkClass mtcInv ;
|
||||
nodeLinkClass * mtcInv_ptr ;
|
||||
|
@ -1544,6 +1542,12 @@ void daemon_service_run ( void )
|
|||
mtcTimer_start ( mtcInv.mtcTimer_dor, mtcTimer_handler, timeout );
|
||||
}
|
||||
|
||||
/* If mtcAgent is starting up tell the heartbeat service to heartbeat
|
||||
* at its configured rate.
|
||||
* This is done in case the mtcAgent was restarted while in MNFA mode
|
||||
* where it had commanded the hbsAgent to heartbeat at a reduced rate. */
|
||||
send_hbs_command ( mtcInv.my_hostname, MTC_RECOVER_HBS );
|
||||
|
||||
/* Run Maintenance service forever */
|
||||
for ( ; ; )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue