Hi Praveen, I don't think this is necessary because avd_sg_2n_su_chose_asgn() (and others) checks the readiness state. And the readiness state is only set to "in-service" in other parts of the code by first testing this macro which I've modified.
So, if an SU is not instantiated, the readiness state will now never be set to "in-service", with this fix. Part of the problem is that readiness state was being set to in-service because the macro wasn't checking presence state (among other tests.) Alex On 05/06/2014 08:18 AM, praveen malviya wrote: > In #493 the assignments were given to SU5 without checking its > presence state. But this was not because of some admin operation, but > due to the continuous faults in > in all other SUs which were receiving the assignments. So ideally such > a check of Presence sate should be added in assignment algorithms > (avd_sg_2n_su_chose_asgn() for 2N model) also. > > > Thanks, > Praveen > On 03-May-14 12:57 AM, Alex Jones wrote: >> 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: • 3 signs your SCM is hindering your productivity • Requirements for releasing software faster • 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