Hi,

I think you can push this and we can continue investigate how this works for 
NPI SUs. It should work properly so there might be additional changes needed. I 
don't currently have any test case for NPI SU and cluster start but a couple of 
failing PI SU cluster start test cases without this...

Thanks,
Hans

> -----Original Message-----
> From: Nagendra Kumar [mailto:nagendr...@oracle.com]
> Sent: den 3 december 2013 10:15
> To: Hans Feldt; Sirisha Alla; Hans Nordebäck
> Cc: opensaf-devel@lists.sourceforge.net
> Subject: RE: [PATCH 1 of 1] amfd: Add oper state criteria for SUs for 
> stopping Cluster Timer[#76]
> 
> Hi Hans,
>       cluster_su_instantiation_done is called with SU as param from 
> avd_su_oper_state_evh and avd_su_oper_state_evh will not
> come into picture for NPI sus before cluster timer expires. I can add some 
> comment in cluster_su_instantiation_done that su as param
> is always get called for PI Sus. Is that ok?
> 
> Thanks
> -Nagu
> -----Original Message-----
> From: Hans Feldt [mailto:hans.fe...@ericsson.com]
> Sent: 02 December 2013 20:31
> To: Nagendra Kumar; Sirisha Alla; hans.nordeb...@ericsson.com
> Cc: opensaf-devel@lists.sourceforge.net
> Subject: Re: [PATCH 1 of 1] amfd: Add oper state criteria for SUs for 
> stopping Cluster Timer[#76]
> 
> 
> "The readiness state of a non-pre-instantiable service unit is in-service if 
> all of the following conditions are met:
> 
> * its operational state and the operational state of its containing node is 
> enabled "
> 
> So what I mean is the logic cannot check presence state since NPI SUs would 
> not be INSTANTIATED but yet ENABLED and IN-SERVICE.
> So it should check readiness state as that is the base for assignments. If 
> every SU is IN-SERVICE (except those in -FAILED) go ahead and
> assign.
> 
> Thanks,
> Hans
> 
> On 12/02/2013 03:11 PM, Nagendra Kumar wrote:
> > Hi Hans,
> >       NPI is not started till given assignment, so I don't understand, why 
> > npi su should be considered or was rather left out in the
> patch ? Please elaborate.
> >
> > I will change the function name.
> >
> > Thanks
> > -Nagu
> > -----Original Message-----
> > From: Hans Feldt [mailto:hans.fe...@ericsson.com]
> > Sent: 02 December 2013 18:57
> > To: Nagendra Kumar; Sirisha Alla; hans.nordeb...@ericsson.com
> > Cc: opensaf-devel@lists.sourceforge.net
> > Subject: Re: [PATCH 1 of 1] amfd: Add oper state criteria for SUs for
> > stopping Cluster Timer[#76]
> >
> > Hi,
> >
> > It seems (from my testing) that the patch fixes the problem for 
> > pre-instantiable service units. But most likely not for non-pre-
> instantiable SUs.
> >
> > Your code comment started my thinking that we should really be checking SUs 
> > Readiness State for INSERVICE instead.
> >
> > Which means cluster_su_instantiation_done() is an illogical name. 
> > all_sus_inservice() could be a better name?
> >
> > Thanks,
> > Hans
> >
> >
> > On 11/29/2013 12:08 PM, nagendr...@oracle.com wrote:
> >>    osaf/services/saf/amf/amfd/ndfsm.cc  |   5 ++---
> >>    osaf/services/saf/amf/amfd/ndproc.cc |  27 ++++++++-------------------
> >>    osaf/services/saf/amf/amfd/sgproc.cc |   7 +++++++
> >>    3 files changed, 17 insertions(+), 22 deletions(-)
> >>
> >>
> >> diff --git a/osaf/services/saf/amf/amfd/ndfsm.cc
> >> b/osaf/services/saf/amf/amfd/ndfsm.cc
> >> --- a/osaf/services/saf/amf/amfd/ndfsm.cc
> >> +++ b/osaf/services/saf/amf/amfd/ndfsm.cc
> >> @@ -221,9 +221,8 @@ void avd_nd_ncs_su_assigned(AVD_CL_CB *c
> >>                            m_AVD_CLINIT_TMR_START(cb);
> >>                    }
> >>
> >> -          /* No application SUs hosted on this node. Check if all SUs are 
> >> instantiated cluster-wide,
> >> -             if so start assignments */
> >> -          if ((avnd->list_of_su == NULL) && (cb->amf_init_tmr.is_active 
> >> == true) &&
> >> +          /* Check if all SUs are in 'in-service' cluster-wide, if so 
> >> start assignments */
> >> +          if ((cb->amf_init_tmr.is_active == true) &&
> >>                                    (cluster_su_instantiation_done(cb, 
> >> NULL) == true)) {
> >>                            avd_stop_tmr(cb, &cb->amf_init_tmr);
> >>                            cluster_startup_expiry_event_generate(cb);
> >> diff --git a/osaf/services/saf/amf/amfd/ndproc.cc
> >> b/osaf/services/saf/amf/amfd/ndproc.cc
> >> --- a/osaf/services/saf/amf/amfd/ndproc.cc
> >> +++ b/osaf/services/saf/amf/amfd/ndproc.cc
> >> @@ -493,11 +493,9 @@ bool cluster_su_instantiation_done(AVD_C
> >>                    goto node_walk;
> >>
> >>            TRACE("SU '%s', SUPresenceState '%u'", su->name.value, 
> >> su->saAmfSUPresenceState);
> >> -  if ((su->saAmfSUPresenceState == SA_AMF_PRESENCE_INSTANTIATED) ||
> >> -                  (su->saAmfSUPresenceState ==
> >> -                   SA_AMF_PRESENCE_INSTANTIATION_FAILED) ||
> >> -                  (su->saAmfSUPresenceState ==
> >> -                   SA_AMF_PRESENCE_TERMINATION_FAILED)) {
> >> +  if (((su->saAmfSUOperState == SA_AMF_OPERATIONAL_ENABLED) && 
> >> (su->saAmfSUPresenceState ==
> >> +                                  SA_AMF_PRESENCE_INSTANTIATED)) ||
> >> +                  (su->saAmfSUOperState == SA_AMF_OPERATIONAL_DISABLED)) {
> >>            } else {
> >>                    /* Don't calculate if SU is in transient state.*/
> >>                    goto done;
> >> @@ -519,11 +517,11 @@ node_walk:
> >>                                                    
> >> (su_ptr->su_on_node->saAmfNodeAdminState !=
> >>                                                     
> >> SA_AMF_ADMIN_LOCKED_INSTANTIATION) &&
> >>                                                    
> >> (su_ptr->saAmfSUPreInstantiable == true)) {
> >> -                                  if ((su_ptr->saAmfSUPresenceState == 
> >> SA_AMF_PRESENCE_INSTANTIATED) ||
> >> -                                                  
> >> (su_ptr->saAmfSUPresenceState ==
> >> -                                                   
> >> SA_AMF_PRESENCE_INSTANTIATION_FAILED) ||
> >> -                                                  
> >> (su_ptr->saAmfSUPresenceState ==
> >> -                                                   
> >> SA_AMF_PRESENCE_TERMINATION_FAILED)) {
> >> +                                  if (((su_ptr->saAmfSUOperState == 
> >> SA_AMF_OPERATIONAL_ENABLED) &&
> >> +                                                          
> >> (su_ptr->saAmfSUPresenceState ==
> >> +                                                           
> >> SA_AMF_PRESENCE_INSTANTIATED)) ||
> >> +                                                  
> >> (su_ptr->saAmfSUOperState ==
> >> +                                                   
> >> SA_AMF_OPERATIONAL_DISABLED)) {
> >>                                            } else {
> >>                                                    goto done;
> >>                                            }
> >> @@ -743,15 +741,6 @@ void avd_data_update_req_evh(AVD_CL_CB *
> >>                                            /* send response to pending clm 
> >> callback */
> >>                                            if 
> >> (su->su_on_node->clm_pend_inv != 0)
> >>                                                    clm_pend_response(su,
> >> static_cast<SaAmfPresenceStateT>(l_val));
> >> -
> >> -                                  /* No application SUs hosted on this 
> >> node. Check if all SUs are instantiated
> >> -                                     cluster-wide, if so start 
> >> assignments */
> >> -                                  if ((cb->amf_init_tmr.is_active == 
> >> true) &&
> >> -                                                  
> >> (su->sg_of_su->sg_ncs_spec == false) &&
> >> -                                                  
> >> (cluster_su_instantiation_done(cb, su) == true)) {
> >> -                                          avd_stop_tmr(cb, 
> >> &cb->amf_init_tmr);
> >> -                                          
> >> cluster_startup_expiry_event_generate(cb);
> >> -                                  }
> >>                                    } else {
> >>                                            /* log error that a the  value 
> >> len is invalid */
> >>                                            LOG_ER("%s:%u: %u", __FILE__, 
> >> __LINE__, n2d_msg->msg_info.n2d_data_req.param_info.
> >> diff --git a/osaf/services/saf/amf/amfd/sgproc.cc
> >> b/osaf/services/saf/amf/amfd/sgproc.cc
> >> --- a/osaf/services/saf/amf/amfd/sgproc.cc
> >> +++ b/osaf/services/saf/amf/amfd/sgproc.cc
> >> @@ -411,6 +411,13 @@ void avd_su_oper_state_evh(AVD_CL_CB *cb
> >>                    goto done;
> >>            }
> >>
> >> +  /* Check if all SUs are in 'in-service' cluster-wide, if so start 
> >> assignments */
> >> +  if ((cb->amf_init_tmr.is_active == true) &&
> >> +                  (cluster_su_instantiation_done(cb, su) == true)) {
> >> +          avd_stop_tmr(cb, &cb->amf_init_tmr);
> >> +          cluster_startup_expiry_event_generate(cb);
> >> +  }
> >> +
> >>            /* Verify that the SU operation state is disable and do the 
> >> processing. */
> >>            if (n2d_msg->msg_info.n2d_opr_state.su_oper_state == 
> >> SA_AMF_OPERATIONAL_DISABLED) {
> >>                    /* if the SU is NCS SU, call the node FSM routine to 
> >> handle the failure.
> >>
> >>
> >
> >

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to