Fix AIO-DX/DC no controller active issue
When controller-1 reboot in an AIO-DX/DC setup, mgmt/infra network will temporarily go down. This is expected. However, SM couldn't determine the interface going up again when the controller-1 reboot after unlock the first time. Add code to reverify the state of down interfaces when heartbeat message is received. Closes-Bug: 1809315 Change-Id: I02c9b6bf35539df2d36ad6b665b0a5ce8f2a1c75 Signed-off-by: Bin Qian <bin.qian@windriver.com>
This commit is contained in:
parent
9cc9ce0a2d
commit
6c93e74230
|
@ -316,8 +316,20 @@ void sm_failover_heartbeat_restore( SmFailoverInterfaceT* interface )
|
||||||
}
|
}
|
||||||
else if( SM_FAILOVER_INTERFACE_DOWN == state )
|
else if( SM_FAILOVER_INTERFACE_DOWN == state )
|
||||||
{
|
{
|
||||||
// need to wait for if up
|
bool enabled = true;
|
||||||
return;
|
SmErrorT error = sm_hw_get_if_state(interface->interface_name, &enabled);
|
||||||
|
if(SM_OKAY != error)
|
||||||
|
{
|
||||||
|
DPRINTFE("Couldn't get interface (%s) state. ", interface->interface_name);
|
||||||
|
}
|
||||||
|
if(!enabled)
|
||||||
|
{
|
||||||
|
// need to wait for if up
|
||||||
|
return;
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
DPRINTFI("Interface %s is verified as UP after receiving heartbeat.", interface->interface_name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(if_info->set_state(SM_FAILOVER_INTERFACE_OK))
|
if(if_info->set_state(SM_FAILOVER_INTERFACE_OK))
|
||||||
|
@ -1104,8 +1116,8 @@ void _log_nodes_state()
|
||||||
}
|
}
|
||||||
DPRINTFI("Host state %d, I/F state %d, peer I/F state %d",
|
DPRINTFI("Host state %d, I/F state %d, peer I/F state %d",
|
||||||
_node_comm_state,
|
_node_comm_state,
|
||||||
_peer_if_state,
|
_host_state,
|
||||||
_host_state
|
_peer_if_state
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// ****************************************************************************
|
// ****************************************************************************
|
||||||
|
|
Loading…
Reference in New Issue