Ack, code review only.

Thanks,
Praveen
On 02-Sep-14 4:44 PM, [email protected] wrote:
>   osaf/services/saf/amf/amfnd/susm.cc |  15 ++++++++++++---
>   1 files changed, 12 insertions(+), 3 deletions(-)
>
>
> Amfnd tries to send susi response if npi su presence state translates
> into instantiation failed state from restarting state. This is wrong.
> As restarting npi su can't be in assigning mode when it is in restarting 
> state.
> So, Amfnd is not supposed to send susi response to Amfd.
>
> Code changes makes sure that npi su is failed over on other su if
> it happens.
>
> 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
> @@ -1695,9 +1695,8 @@ uint32_t avnd_su_pres_st_chng_prc(AVND_C
>
>               /* instantiating/instantiated/restarting -> inst-failed */
>               if (((SA_AMF_PRESENCE_INSTANTIATING == prv_st) ||
> -                  (SA_AMF_PRESENCE_INSTANTIATED == prv_st) ||
> -                  (SA_AMF_PRESENCE_RESTARTING == prv_st)) && 
> (SA_AMF_PRESENCE_INSTANTIATION_FAILED == final_st)) {
> -                     TRACE("SU Instantiating/Instantiated/Restarting -> 
> Instantiation Failed");
> +                  (SA_AMF_PRESENCE_INSTANTIATED == prv_st)) && 
> (SA_AMF_PRESENCE_INSTANTIATION_FAILED == final_st)) {
> +                     TRACE("SU Instantiating/Instantiated -> Instantiation 
> Failed");
>                       /* si-assignment failed .. inform avd */
>                       TRACE("SI-Assignment failed, Informing AVD");
>                       rc = avnd_di_susi_resp_send(cb, su, si);
> @@ -1715,6 +1714,16 @@ uint32_t avnd_su_pres_st_chng_prc(AVND_C
>                       rc = avnd_di_oper_send(cb, su, 
> SA_AMF_COMPONENT_FAILOVER);
>
>               }
> +             if ((SA_AMF_PRESENCE_RESTARTING == prv_st) && 
> (SA_AMF_PRESENCE_INSTANTIATION_FAILED == final_st)) {
> +                     TRACE("Restarting -> Termination Failed");
> +                     if (sufailover_in_progress(su)) {
> +                             /*Do not reset any flag, this will be done as a 
> part of repair.*/
> +                             rc = avnd_di_oper_send(cb, su, 
> AVSV_ERR_RCVR_SU_FAILOVER);
> +                             osafassert(NCSCC_RC_SUCCESS == rc);
> +                             avnd_su_si_del(avnd_cb, &su->name);
> +                             goto done;
> +                     }
> +             }
>
>               if ((SA_AMF_PRESENCE_RESTARTING == prv_st) && 
> (SA_AMF_PRESENCE_INSTANTIATED == final_st))
>                       rc = npi_su_restarting_to_instantiated(su);
>

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to