Cleanup mtcAgent error logging during startup
- reduced log level in http util to warning - use inservice test handler to ensure state change notification is sent to vim - reduce retry count from 3 to 1 for add_handler state_change vim notification Test plan: PASS - AIO-SX: ansible controller startup (race condition) PASS - AIO-DX: ansible controller startup PASS - AIO-DX: SWACT PASS - AIO-DX: power off restart PASS - AIO-DX: full ISO install PASS - AIO-DX: Lock Host PASS - AIO-DX: Unlock Host PASS - AIO-DX: Fail Host ( by rebooting unlocked-enabled standby controller) Story: 2010533 Task: 47338 Signed-off-by: Kyale, Eliud <Eliud.Kyale@windriver.com> Change-Id: I7576e2642d33c69a4b355be863bd7183fbb81f45
This commit is contained in:
parent
56ab793bc5
commit
502662a8a7
@ -564,6 +564,8 @@ nodeLinkClass::node* nodeLinkClass::addNode( string hostname )
|
|||||||
ptr->was_dor_recovery_mode= false ;
|
ptr->was_dor_recovery_mode= false ;
|
||||||
ptr->dor_recovery_time = 0 ;
|
ptr->dor_recovery_time = 0 ;
|
||||||
|
|
||||||
|
ptr->vim_notified = false ;
|
||||||
|
|
||||||
ptr->ar_disabled = false ;
|
ptr->ar_disabled = false ;
|
||||||
ptr->ar_cause = MTC_AR_DISABLE_CAUSE__NONE ;
|
ptr->ar_cause = MTC_AR_DISABLE_CAUSE__NONE ;
|
||||||
memset (&ptr->ar_count, 0, sizeof(ptr->ar_count));
|
memset (&ptr->ar_count, 0, sizeof(ptr->ar_count));
|
||||||
|
@ -157,6 +157,8 @@ private:
|
|||||||
/** set true if the BMC is provisioned */
|
/** set true if the BMC is provisioned */
|
||||||
bool bmc_provisioned ;
|
bool bmc_provisioned ;
|
||||||
|
|
||||||
|
/** set true upon first successful vim notification */
|
||||||
|
bool vim_notified ;
|
||||||
|
|
||||||
/** general retry counter */
|
/** general retry counter */
|
||||||
int retries ;
|
int retries ;
|
||||||
|
@ -443,7 +443,7 @@ int mtcHttpUtil_status ( libEvent & event )
|
|||||||
}
|
}
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
elog ("%s connection loss (%s:%d)\n",
|
wlog ("%s connection loss (%s:%d)\n",
|
||||||
event.log_prefix.c_str(), event.ip.c_str(), event.port );
|
event.log_prefix.c_str(), event.ip.c_str(), event.port );
|
||||||
event.status = FAIL_HTTP_ZERO_STATUS ;
|
event.status = FAIL_HTTP_ZERO_STATUS ;
|
||||||
rc = FAIL_HTTP_ZERO_STATUS ;
|
rc = FAIL_HTTP_ZERO_STATUS ;
|
||||||
|
@ -6379,23 +6379,6 @@ int nodeLinkClass::add_handler ( struct nodeLinkClass::node * node_ptr )
|
|||||||
}
|
}
|
||||||
case MTC_ADD__MTC_SERVICES:
|
case MTC_ADD__MTC_SERVICES:
|
||||||
{
|
{
|
||||||
if ( node_ptr->operState == MTC_OPER_STATE__ENABLED )
|
|
||||||
{
|
|
||||||
/* Inform the VIM that this host is enabled */
|
|
||||||
mtcVimApi_state_change ( node_ptr, VIM_HOST_ENABLED, 3 );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( node_ptr->availStatus == MTC_AVAIL_STATUS__FAILED )
|
|
||||||
{
|
|
||||||
mtcVimApi_state_change ( node_ptr, VIM_HOST_FAILED, 3 );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mtcVimApi_state_change ( node_ptr, VIM_HOST_DISABLED, 3 );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
send_hbs_command ( node_ptr->hostname, MTC_CMD_ADD_HOST );
|
send_hbs_command ( node_ptr->hostname, MTC_CMD_ADD_HOST );
|
||||||
|
|
||||||
if ( ( AIO_SYSTEM ) || ( is_worker (node_ptr) == true ))
|
if ( ( AIO_SYSTEM ) || ( is_worker (node_ptr) == true ))
|
||||||
@ -7941,6 +7924,27 @@ int nodeLinkClass::insv_test_handler ( struct nodeLinkClass::node * node_ptr )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( node_ptr->vim_notified == false )
|
||||||
|
{
|
||||||
|
if ( node_ptr->operState == MTC_OPER_STATE__ENABLED )
|
||||||
|
{
|
||||||
|
/* Inform the VIM that this host is enabled */
|
||||||
|
mtcVimApi_state_change ( node_ptr, VIM_HOST_ENABLED, 3 );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( node_ptr->availStatus == MTC_AVAIL_STATUS__FAILED )
|
||||||
|
{
|
||||||
|
mtcVimApi_state_change ( node_ptr, VIM_HOST_FAILED, 3 );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mtcVimApi_state_change ( node_ptr, VIM_HOST_DISABLED, 3 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
node_ptr->vim_notified = true ;
|
||||||
|
}
|
||||||
|
|
||||||
node_ptr->insv_test_count++ ;
|
node_ptr->insv_test_count++ ;
|
||||||
insvTestStageChange ( node_ptr, MTC_INSV_TEST__START );
|
insvTestStageChange ( node_ptr, MTC_INSV_TEST__START );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user