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)  \


------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to