Hi Praveen,

Ack for code review, just one minor comment as below:
Should we reset the @failed_su = nullptr in case of NODE_FAILOVER as well?
uint32_t avnd_comp_clc_fsm_run(AVND_CB *cb, AVND_COMP *comp, 
AVND_COMP_CLC_PRES_FSM_EV ev)
{
...
                 LOG_NO("Informing director of node fail-over");
                 rc = avnd_di_oper_send(cb, cb->failed_su, 
SA_AMF_NODE_FAILOVER);
                 osafassert(NCSCC_RC_SUCCESS == rc);
...
}

Thanks,
Minh
On 02/09/16 15:34, praveen.malv...@oracle.com wrote:
>   osaf/services/saf/amf/amfnd/susm.cc |  3 ++-
>   1 files changed, 2 insertions(+), 1 deletions(-)
>
>
> In the reported problem, AMFND sends multiple mode-switchover recovery request
> for same fault when nodeautorepair is disabled. Sometimes, amfnd is successful
> in sending the request but it may crash also.
>
> In the reported problem, AMFND reports node-switchover recovery to AMFD. AMFD
> removes assignments gracefully and does not reboot the node as nodeautorepair
> is disabled. After this user deletes the faulty SU after perofrming lock and 
> lock-in
> admin operations. Same SU is added again and instantiated. AMFND while 
> instantiating
> the SU, sends recovery request to AMFD again for the same fault.
>
> Patch resets failed_su in avnd_cb so that recovery request is not sent
> for same fault again.
>
> diff --git a/osaf/services/saf/amf/amfnd/susm.cc 
> b/osaf/services/saf/amf/amfnd/susm.cc
> --- a/osaf/services/saf/amf/amfnd/susm.cc
> +++ b/osaf/services/saf/amf/amfnd/susm.cc
> @@ -1413,6 +1413,7 @@ static void perform_pending_nodeswitchov
>               if (su->sufailover == false) {
>                       uint32_t rc = avnd_di_oper_send(avnd_cb, su, 
> SA_AMF_NODE_SWITCHOVER);
>                       osafassert(NCSCC_RC_SUCCESS == rc);
> +                     avnd_cb->failed_su = nullptr;
>               }
>       }
>   
> @@ -1478,7 +1479,7 @@ uint32_t avnd_su_pres_fsm_run(AVND_CB *c
>               goto done;
>           } else if ((cb->term_state == 
> AVND_TERM_STATE_NODE_SWITCHOVER_STARTED) &&
>                       (cb->oper_state == SA_AMF_OPERATIONAL_DISABLED) &&
> -                     (su->sufailover == false)) {
> +                     (su->sufailover == false) && (cb->failed_su != 
> nullptr)) {
>               perform_pending_nodeswitchover();
>       }
>               
>


------------------------------------------------------------------------------
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to