First I don't think we should bring in cluster and application state just like 
this. It is not relevant for this case and we anyway don't support such ops.

Second this macro is out of control and should be changed into a (inline) 
function instead.
Haven't I already done that in my refactoring series?

I don't see in the analysis what the problem really is. Why the 7 seconds?

Thanks,
Hans

> -----Original Message-----
> From: Alex Jones [mailto:ajo...@genband.com]
> Sent: den 2 maj 2014 21:27
> To: Hans Feldt; praveen.malv...@oracle.com; nagendr...@oracle.com
> Cc: opensaf-devel@lists.sourceforge.net
> Subject: [PATCH 1 of 1] amfd: fix SU in-service macro [#493]
> 
>  osaf/services/saf/amf/amfd/include/su.h |  13 +++++++++----
>  1 files changed, 9 insertions(+), 4 deletions(-)
> 
> 
> May  2 18:56:32 linux osafamfnd[12420]: NO Assigned 
> 'safSi=Dataplane-Np1-SI-1,safApp=DataplaneApp' STANDBY to
> 'safSu=Dataplane-SU1,safSg=Dataplane-Np1,safApp=DataplaneApp'
> May  2 18:56:39 linux osafamfnd[12420]: NO 
> 'safSu=Dataplane-SU1,safSg=Dataplane-Np1,safApp=DataplaneApp' Presence State
> INSTANTIATING => INSTANTIATED
> 
> You can see that amfnd has assigned the SI to the SU, but the SU doesn't
> transition to INSTANTIATED until 7 seconds later.  The m_AVD_APP_SU_IS_INSVC
> macro is using tests from B.01.01, so it doesn't take into account SU presence
> state as specified in B.04.01.
> 
> The solution is to bring this macro up to date with B.04.01 by adding tests 
> for
> cluster admin state, application admin state, node operational state, and SU
> presence state.
> 
> diff --git a/osaf/services/saf/amf/amfd/include/su.h 
> b/osaf/services/saf/amf/amfd/include/su.h
> --- a/osaf/services/saf/amf/amfd/include/su.h
> +++ b/osaf/services/saf/amf/amfd/include/su.h
> @@ -33,6 +33,8 @@
>  #include <amf_defs.h>
>  #include <msg.h>
>  #include <comp.h>
> +#include <app.h>
> +#include <cluster.h>
>  #include "include/db_template.h"
> 
>  /**
> @@ -134,11 +136,14 @@ m_AVSV_SEND_CKPT_UPDT_ASYNC_UPDT(cb, su,
>  }
> 
>  #define m_AVD_APP_SU_IS_INSVC(i_su,su_node_ptr) \
> -((su_node_ptr->saAmfNodeAdminState == SA_AMF_ADMIN_UNLOCKED) && \
> +((su_node_ptr->cluster->saAmfClusterAdminState == SA_AMF_ADMIN_UNLOCKED) && \
> +(i_su->sg_of_su->app->saAmfApplicationAdminState == SA_AMF_ADMIN_UNLOCKED) 
> && \
> +(i_su->saAmfSUAdminState == SA_AMF_ADMIN_UNLOCKED) &&\
> +(i_su->sg_of_su->saAmfSGAdminState == SA_AMF_ADMIN_UNLOCKED) &&\
> +(su_node_ptr->saAmfNodeAdminState == SA_AMF_ADMIN_UNLOCKED) && \
>  (su_node_ptr->saAmfNodeOperState == SA_AMF_OPERATIONAL_ENABLED) && \
> -(i_su->sg_of_su->saAmfSGAdminState == SA_AMF_ADMIN_UNLOCKED) &&\
> -(i_su->saAmfSUAdminState == SA_AMF_ADMIN_UNLOCKED) &&\
> -(i_su->saAmfSUOperState == SA_AMF_OPERATIONAL_ENABLED)\
> +(i_su->saAmfSUOperState == SA_AMF_OPERATIONAL_ENABLED) && \
> +(i_su->saAmfSUPresenceState == SA_AMF_PRESENCE_INSTANTIATED || 
> i_su->saAmfSUPresenceState ==
> SA_AMF_PRESENCE_RESTARTING) \
>  )
> 
>  #define m_AVD_GET_SU_NODE_PTR(avd_cb,i_su,su_node_ptr)  \


------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to