Ack with a comment.

    Please do m_NCS_IPC_DETACH() in case of return FAILURE for clm_init().

However why eds_clm_init() can't be called before amf_register?

Thanks,
Ramesh..

On 4/28/2016 8:10 PM, mathi.naic...@oracle.com wrote:
>   osaf/services/saf/edsv/eds/eds_api.c |  23 ++++++++++++++---------
>   1 files changed, 14 insertions(+), 9 deletions(-)
>
>
> With the introduction of spares support #79, all services were modified to 
> wait for AMF role assignment
> to register with MDS and proceed further with their lifecycle.
> However, this is not necessary and would create a problem of 1781.
> i.e. All services should ideally register with CLM independent of their HA 
> roles as provided by AMF or RDA.
> But ofcourse until now only AMF, EVT, CKPT, MSG, NTF, SMF have been 
> integrated with CLM.
> This patch makes the services register with CLM before entering the wait() 
> for AMF role.
> NTF service is already handling this correctly.
> This is also necessary to make OpenSAF services run - without abort, on nodes 
> that are administratively
> locked/shutdown via CLM node admin commands.
> A separate patch for SMF follow.
>
> diff --git a/osaf/services/saf/edsv/eds/eds_api.c 
> b/osaf/services/saf/edsv/eds/eds_api.c
> --- a/osaf/services/saf/edsv/eds/eds_api.c
> +++ b/osaf/services/saf/edsv/eds/eds_api.c
> @@ -113,6 +113,20 @@ static uint32_t eds_se_lib_init(NCS_LIB_
>               exit(EXIT_FAILURE);
>       }
>   
> +     /* Initialize and Register with CLM */
> +      if (eds_clm_init(eds_cb) != SA_AIS_OK) {
> +             LOG_ER("CLM Init failed");
> +             /* Release EDU handle */
> +             m_NCS_EDU_HDL_FLUSH(&eds_cb->edu_hdl);
> +             /* Destroy the hdl for this CB */
> +             ncshm_destroy_hdl(NCS_SERVICE_ID_EDS, gl_eds_hdl);
> +             gl_eds_hdl = 0;
> +             /* Free the control block */
> +             m_MMGR_FREE_EDS_CB(eds_cb);
> +             TRACE_LEAVE();
> +             return NCSCC_RC_FAILURE;
> +     }
> +
>       if ((rc = initialize_for_assignment(eds_cb, eds_cb->ha_state)) !=
>               NCSCC_RC_SUCCESS) {
>               LOG_ER("initialize_for_assignment FAILED %u", (unsigned) rc);
> @@ -128,7 +142,6 @@ uint32_t initialize_for_assignment(EDS_C
>   {
>       TRACE_ENTER2("ha_state = %d", (int) ha_state);
>       uint32_t rc = NCSCC_RC_SUCCESS;
> -     SaAisErrorT error;
>       if (cb->fully_initialized || ha_state == SA_AMF_HA_QUIESCED) {
>               goto done;
>       }
> @@ -139,14 +152,6 @@ uint32_t initialize_for_assignment(EDS_C
>               goto done;
>       }
>   
> -     /* Initialize and Register with CLM */
> -     error = eds_clm_init(cb);
> -     if (error != SA_AIS_OK) {
> -             LOG_ER("CLM Init failed: %u", (unsigned) error);
> -             rc = NCSCC_RC_FAILURE;
> -             goto done;
> -     }
> -
>       /* Initialize mbcsv interface */
>       if (NCSCC_RC_SUCCESS != (rc = eds_mbcsv_init(cb))) {
>               LOG_ER("eds mbcsv init failed");

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to