Ack.

Tested the following command during SG  unstable (#1 for NwayAct, #2 and #3 for 
Nway):
1. immcfg -a saAmfSIPrefActiveAssignments=2 safSi=AmfDemo,safApp=AmfDemo1
error - saImmOmCcbApply FAILED: SA_AIS_ERR_FAILED_OPERATION (21)
OI reports: IMM: Resource abort: Completed validation fails (Error code: 18)
OI reports: SG'safSg=AmfDemo_2N,safApp=AmfDemo1' is not stable (1)

2. immcfg -a saAmfSIPrefStandbyAssignments=2 safSi=AmfDemo,safApp=AmfDemo1
error - saImmOmCcbApply FAILED: SA_AIS_ERR_FAILED_OPERATION (21)
OI reports: IMM: Resource abort: Completed validation fails (Error code: 18)
OI reports: SG'safSg=AmfDemo_2N,safApp=AmfDemo1' is not stable (2)

3. immcfg -a saAmfSIRank=2 safSi=AmfDemo,safApp=AmfDemo1
error - saImmOmCcbApply FAILED: SA_AIS_ERR_FAILED_OPERATION (21)
OI reports: IMM: Resource abort: Completed validation fails (Error code: 18)
OI reports: SG'safSg=AmfDemo_2N,safApp=AmfDemo1' is not stable (2)

Thanks
-Nagu

> -----Original Message-----
> From: Minh Hon Chau [mailto:[email protected]]
> Sent: 23 November 2016 15:42
> To: [email protected]; Nagendra Kumar; Praveen Malviya;
> [email protected]; [email protected]
> Cc: [email protected]
> Subject: [PATCH 1 of 1] AMFD: Return SA_AIS_ERR_NO_RESOURCES on
> si_ccb_complete if SG is unstable [#2184]
> 
>  osaf/services/saf/amf/amfd/si.cc |  6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> 
> Issue command immcfg to change saAmfSIPrefActiveAssignments while SG is
> unstable, AMF currently returns SA_AIS_ERR_BAD_OPERATION and error
> string as validation abort.
> As result, client stops retrying till SG becomes stable.
> 
> Ideally AMFD should return SA_AIS_ERR_TRY_AGAIN so it will be consistent
> with other cases where admin operations hits unstable SG. But
> SA_AIS_ERR_TRY_AGAIN is not a valid return code for
> SaImmOiCcbCompletedCallbackT at this moment, so this patch returns
> SA_AIS_ERR_NO_RESOURCES so that error string would be "resource abort:
> Completed validation fails (Error code: 18)", and client will catch this error
> string for another try.
> 
> diff --git a/osaf/services/saf/amf/amfd/si.cc
> b/osaf/services/saf/amf/amfd/si.cc
> --- a/osaf/services/saf/amf/amfd/si.cc
> +++ b/osaf/services/saf/amf/amfd/si.cc
> @@ -737,7 +737,7 @@ static SaAisErrorT si_ccb_completed_modi
>                       if (si->sg_of_si->sg_fsm_state !=
> AVD_SG_FSM_STABLE) {
>                               report_ccb_validation_error(opdata, "SG'%s'
> is not stable (%u)", si->sg_of_si->name.c_str(),
>                                               si->sg_of_si->sg_fsm_state);
> -                             rc = SA_AIS_ERR_BAD_OPERATION;
> +                             rc = SA_AIS_ERR_NO_RESOURCES;
>                               break;
>                       }
>                       if (si->sg_of_si->sg_redundancy_model !=
> SA_AMF_N_WAY_ACTIVE_REDUNDANCY_MODEL) { @@ -751,7 +751,7 @@
> static SaAisErrorT si_ccb_completed_modi
>                       if (si->sg_of_si->sg_fsm_state !=
> AVD_SG_FSM_STABLE) {
>                               report_ccb_validation_error(opdata, "SG'%s'
> is not stable (%u)", si->sg_of_si->name.c_str(),
>                                               si->sg_of_si->sg_fsm_state);
> -                             rc = SA_AIS_ERR_BAD_OPERATION;
> +                             rc = SA_AIS_ERR_NO_RESOURCES;
>                               break;
>                       }
>                       if( si->sg_of_si->sg_redundancy_model !=
> SA_AMF_N_WAY_REDUNDANCY_MODEL ) { @@ -775,7 +775,7 @@ static
> SaAisErrorT si_ccb_completed_modi
>                       if (si->sg_of_si->sg_fsm_state !=
> AVD_SG_FSM_STABLE) {
>                               report_ccb_validation_error(opdata, "SG'%s'
> is not stable (%u)", si->sg_of_si->name.c_str(),
>                                               si->sg_of_si->sg_fsm_state);
> -                             rc = SA_AIS_ERR_BAD_OPERATION;
> +                             rc = SA_AIS_ERR_NO_RESOURCES;
>                               break;
>                       }
>               } else {

------------------------------------------------------------------------------
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to