Fix trivial issue found during code review for hbs related code

1. Build-iso - PASS
2. Install iso and unlock all hosts -PASS
3. Force reboot on unlocked host to verify heartbeat failure detection 
and graceful recovery. PASS
4. Verify hbsAgent logs for unexpected logs. PASS

Change-Id: Ia4f52d3ffa52152914f3c221fa6eb860d127724b
Signed-off-by: zhipengl <zhipengs.liu@intel.com>
This commit is contained in:
zhipengl 2018-12-21 19:08:28 +08:00 committed by zhipeng liu
parent 351cc87c9c
commit 68ab0560cf
2 changed files with 5 additions and 11 deletions

View File

@ -8299,7 +8299,7 @@ int nodeLinkClass::lost_pulses ( iface_enum iface, bool & storage_0_responding )
pulse_ptr->b2b_misses_count[iface],
0xfff);
}
/* Once the misses exceed 25 then throttle the logging to avoid flooding */
/* Once the misses exceed 4095 then throttle the logging to avoid flooding */
if ( (pulse_ptr->b2b_misses_count[iface] & 0xfff) == 0 )
{
ilog ("%s %s Pulse Miss (%d)\n", pulse_ptr->hostname.c_str(),
@ -8309,13 +8309,7 @@ int nodeLinkClass::lost_pulses ( iface_enum iface, bool & storage_0_responding )
}
else
{
if ( pulse_ptr->b2b_misses_count[iface] > hbs_failure_threshold )
{
ilog ("%s %s Pulse Miss (%3d) (in failure)\n", pulse_ptr->hostname.c_str(),
get_iface_name_str(iface),
pulse_ptr->b2b_misses_count[iface] );
}
else if ( pulse_ptr->b2b_misses_count[iface] > hbs_degrade_threshold )
if ( pulse_ptr->b2b_misses_count[iface] > hbs_degrade_threshold )
{
ilog ("%s %s Pulse Miss (%3d) (max:%3d) (in degrade)\n", pulse_ptr->hostname.c_str(),
get_iface_name_str(iface),

View File

@ -444,13 +444,13 @@ int daemon_configure ( void )
if ( hbsInv.hbs_degrade_threshold >= hbsInv.hbs_failure_threshold )
{
wlog ("Degrade threshold should be larger than Failure threshold\n");
wlog ("Degrade threshold should be smaller than Failure threshold\n");
wlog ("Heartbeat 'degrade' state disabled ; see %s\n", MTCE_CONF_FILE);
}
for ( ;; )
{
get_ip_addresses ( hbsInv.my_hostname, hbsInv.my_local_ip , hbsInv.my_float_ip );
if ( hbsInv.my_float_ip.empty() || hbsInv.my_float_ip.empty() )
if ( hbsInv.my_local_ip.empty() || hbsInv.my_float_ip.empty() )
{
if ( waiting_msg == false )
{
@ -1105,7 +1105,7 @@ int _pulse_receive ( iface_enum iface , unsigned int seq_num )
// mlog ("%s", &str[0]);
mem_log (str);
#endif
if ( extra.empty())
if ( !extra.compare("Rsp"))
{
detected_pulses++ ;
}