Ok.
Also for #2, saAmfCompNumMaxInstantiateWithoutDelay is not updated at amfnd.

Please raise a single ticket for both the issues.

Thanks
-Nagu

> -----Original Message-----
> From: Hans Nordebäck [mailto:[email protected]]
> Sent: 11 September 2014 19:10
> To: Nagendra Kumar
> Cc: [email protected]
> Subject: RE: [devel] [PATCH 1 of 1] AMF: support immediate effect when
> changing SaAmfCompGlobalAttributes [#819]
> 
> Hi Nagu, the problem is that the information that an attribute has been 
> deleted
> is not known at the amfnd side, amfd uses the value_is_deleted flag
> to update an attribute with e.g. the  global attribute. To solve this, either:
> 
> 1)  re-introduce the applier.
> 2) add a new field/variable  to the AVSV_PARAM_INFO to e.g. indicate delete of
> an attribute value. There may be upgrade problems with this.
> 3) do all processing regarding changing "base" and "inherited" attributes in
> amfd.
> 
> /Thanks HansN
> 
> 
> -----Original Message-----
> From: Nagendra Kumar [mailto:[email protected]]
> Sent: den 10 september 2014 14:04
> To: Hans Nordebäck
> Cc: [email protected]
> Subject: RE: [devel] [PATCH 1 of 1] AMF: support immediate effect when
> changing SaAmfCompGlobalAttributes [#819]
> 
> > is not changed, do you mean not changed  in IMM?
> No, I mean in the code.
> 
> Let me explain a bit more on both the points.
> 
> 1. Configuring saAmfCompNumMaxInstantiateWithoutDelay(say 10) and then
> changing saAmfNumMaxInstantiateWithoutDelay(change from 20 to 30). Of
> course, it didn't result in changing the value of
> saAmfCompNumMaxInstantiateWithoutDelay(it will be still 10) because if it is
> not defined, then only it should take value of
> saAmfNumMaxInstantiateWithoutDelay otherwise it will not as per Figure 37.
> 
> saAmfCompNumMaxInstantiateWithoutDelay : SaUint32T [0..1] =
> saAmfNumMaxInstantiateWithoutDelay {CONFIG, WRITABLE}
> 
> This is working fine as per expected.
> 
> But when I reset/delete the value of
> saAmfCompNumMaxInstantiateWithoutDelay, this means that
> saAmfCompNumMaxInstantiateWithoutDelay is not configured and it should
> inherit the value of saAmfNumMaxInstantiateWithoutDelay(say 20) now as per
> Specs. So, now, saAmfCompNumMaxInstantiateWithoutDelay should have 20.
> 
> Now change saAmfNumMaxInstantiateWithoutDelay(change from 20 to 40).
> The value of saAmfCompNumMaxInstantiateWithoutDelay should be changed
> now to 40. But is not changed. This is the problem.
> 
> 2. Not configuring saAmfCompNumMaxInstantiateWithoutDelay in xml. This will
> inherit value from saAmfNumMaxInstantiateWithoutDelay(say 20).
> Now,  change saAmfNumMaxInstantiateWithoutDelay from 20 to 30. The
> changed value took effect and saAmfCompNumMaxInstantiateWithoutDelay is
> now 30.
> 
> But when I change the value of
> saAmfCompNumMaxInstantiateWithoutDelay(that means now I have
> configured it) via ccb command. This means that when I change the value of
> saAmfNumMaxInstantiateWithoutDelay, the value of
> saAmfCompNumMaxInstantiateWithoutDelay should not change as per Specs.
> 
> But when we change saAmfNumMaxInstantiateWithoutDelay, this results in
> changing the value of saAmfCompNumMaxInstantiateWithoutDelay, which is
> not expected.
> 
> Thanks
> -Nagu
> 
> > -----Original Message-----
> > From: Hans Nordebäck [mailto:[email protected]]
> > Sent: 08 September 2014 12:49
> > To: Nagendra Kumar
> > Cc: [email protected]; Hans Nordebäck
> > Subject: RE: [devel] [PATCH 1 of 1] AMF: support immediate effect when
> > changing SaAmfCompGlobalAttributes [#819]
> >
> > Hi Nagu,
> >
> > changing/deleting  saAmfCompNumMaxInstantiateWithoutDelay and then
> > change saAmfNumMaxInstantiateWithoutDelay,
> > saAmfCompNumMaxInstantiateWithoutDelay
> > is not changed, do you mean not changed  in IMM?
> > Looking at the amfnd traces the  saAmfNumMaxInstantiateWithoutDelay is
> > used instead of the newly deleted
> saAmfCompNumMaxInstantiateWithoutDelay.
> > Isn't  this is how it should work. /Regards HansN
> >
> > -----Original Message-----
> > From: Hans Nordebäck [mailto:[email protected]]
> > Sent: den 4 september 2014 13:33
> > To: Nagendra Kumar
> > Cc: [email protected]
> > Subject: Re: [devel] [PATCH 1 of 1] AMF: support immediate effect when
> > changing SaAmfCompGlobalAttributes [#819]
> >
> > Hi Nagu, I'll check this and the other patches. I guess I have missed
> > these use cases. /Thanks HansN On 09/04/14 12:41, Nagendra Kumar wrote:
> > > Hi Hans N,
> > >
> > > There are some white spaces in the patch, please check below(Search
> > > with
> > Nagu).
> > >
> > > Tested following scenarios:
> > > 1. Configuring saAmfCompNumMaxInstantiateWithoutDelay and then
> > changing saAmfNumMaxInstantiateWithoutDelay. Of course, it didn't
> > result in changing the value.
> > > But when I reset/delete the value of
> > saAmfCompNumMaxInstantiateWithoutDelay and then change
> > saAmfNumMaxInstantiateWithoutDelay,
> > saAmfCompNumMaxInstantiateWithoutDelay is not changed, which is not
> > expected.
> > >
> > > 2. Not configuring saAmfCompNumMaxInstantiateWithoutDelay and then
> > changing saAmfNumMaxInstantiateWithoutDelay. The changed value took
> > effect.
> > > But when I change the value of
> > saAmfCompNumMaxInstantiateWithoutDelay(that means now I have
> > configured it) and then change saAmfNumMaxInstantiateWithoutDelay,
> > this changes the value of saAmfCompNumMaxInstantiateWithoutDelay,
> > which is not expected.
> > >
> > > I am not sure if this problem exists in older patch series, but this
> > > patch needs
> > correction.
> > >
> > > Thanks
> > > -Nagu
> > >> -----Original Message-----
> > >> From: Hans Nordeback [mailto:[email protected]]
> > >> Sent: 26 August 2014 18:11
> > >> To: Nagendra Kumar; [email protected]
> > >> Cc: [email protected]
> > >> Subject: [PATCH 1 of 1] AMF: support immediate effect when changing
> > >> SaAmfCompGlobalAttributes [#819]
> > >>
> > >>   osaf/libs/common/amf/include/amf_defs.h         |   9 +++++
> > >>   osaf/services/saf/amf/amfd/comptype.cc          |  12 +++++++
> > >>   osaf/services/saf/amf/amfnd/compdb.cc           |  41
> > >> ++++++++++++++++++++++++-
> > >>   osaf/services/saf/amf/amfnd/di.cc               |   3 +
> > >>   osaf/services/saf/amf/amfnd/include/avnd_comp.h |   2 +
> > >>   5 files changed, 66 insertions(+), 1 deletions(-)
> > >>
> > >>
> > >> Added support for saAmfNumMaxInstantiateWithoutDelay
> > >>
> > >> diff --git a/osaf/libs/common/amf/include/amf_defs.h
> > >> b/osaf/libs/common/amf/include/amf_defs.h
> > >> --- a/osaf/libs/common/amf/include/amf_defs.h
> > >> +++ b/osaf/libs/common/amf/include/amf_defs.h
> > >> @@ -272,6 +272,15 @@ typedef enum
> > >>      saAmfHctDefMaxDuration_ID = 2,
> > >>   } AVSV_AMF_HEALTHCHECK_TYPE_ATTR_ID;
> > >>
> > >> +/* Attribute ID enum for the SaAmfCompGlobalAttributes class */
> > >> +typedef enum {
> > >> +   saAmfNumMaxInstantiateWithoutDelay_ID = 1,
> > >> +   saAmfNumMaxInstantiateWithDelay_ID = 2,
> > >> +   saAmfNumMaxAmStartAttempts_ID = 3,
> > >> +   saAmfNumMaxAmStopAttempts_ID = 4,
> > >> +   saAmfDelayBetweenInstantiateAttempts_ID = 5   [Nagu]: Here.
> > >> +} AVSV_AMF_COMP_GLOBAL_ATTRIBUTES_ATTR_ID;
> > >>
> > >>   #define AVSV_COMMON_SUB_ID_DEFAULT_VAL 1
> > >>   #define SA_AMF_PRESENCE_ORPHANED
> > >> (SA_AMF_PRESENCE_TERMINATION_FAILED+1)
> > >> diff --git a/osaf/services/saf/amf/amfd/comptype.cc
> > >> b/osaf/services/saf/amf/amfd/comptype.cc
> > >> --- a/osaf/services/saf/amf/amfd/comptype.cc
> > >> +++ b/osaf/services/saf/amf/amfd/comptype.cc
> > >> @@ -748,12 +748,23 @@ static void avd_compglobalattrs_ccb_appl
> > >>          switch (opdata->operationType) {
> > >>          case CCBUTIL_MODIFY:
> > >>                  while ((attrMod = opdata->param.modify.attrMods[i++]) !=
> > >> NULL) {
> > >> +                        AVSV_PARAM_INFO param;
> > >> +                        memset(&param, 0, sizeof(param));
> > >> +                        param.class_id =
> > >> AVSV_SA_AMF_COMP_GLOBAL_ATTR;
> > >> +                        param.act = AVSV_OBJ_OPR_MOD;
> > >> +                        param.name = opdata->objectName;
> > >> +
> > >>                          if 
> > >> (!strcmp("saAmfNumMaxInstantiateWithoutDelay",
> > >> attrMod->modAttr.attrName)) {
> > >>
> > >>  TRACE("saAmfNumMaxInstantiateWithoutDelay modified from '%u' to
> > >> '%u'",
> > >>
> > >>  avd_comp_global_attrs.saAmfNumMaxInstantiateWithoutDelay,
> > >>                                                  *((SaUint32T *)attrMod-
> > >>> modAttr.attrValues[0]));
> > >>  avd_comp_global_attrs.saAmfNumMaxInstantiateWithoutDelay =
> > >>                                          *((SaUint32T *)attrMod-
> > >>> modAttr.attrValues[0]);
> > >> +
> > >> +                                param.value_len =
> > >> sizeof(avd_comp_global_attrs.saAmfNumMaxInstantiateWithoutDelay);
> > >> +                                memcpy(param.value,
> > >> &avd_comp_global_attrs.saAmfNumMaxInstantiateWithoutDelay,
> > >> param.value_len);
> > >> +                                param.attr_id =
> > >> saAmfNumMaxInstantiateWithoutDelay_ID;
> > >> +                                avd_snd_op_req_msg(avd_cb, NULL,
> > >> &param);
> > >>                          }
> > >>                          if (!strcmp("saAmfNumMaxInstantiateWithDelay",
> > >> attrMod->modAttr.attrName)) {
> > >>                                  TRACE("saAmfNumMaxInstantiateWithDelay
> > >> modified from '%u' to '%u'",
> > >> @@ -789,6 +800,7 @@ static void avd_compglobalattrs_ccb_appl
> > >>                  osafassert(0);
> > >>                  break;
> > >>          }
> > >> +        TRACE_LEAVE();
> > >>   }
> > >>
> > >>   static SaAisErrorT
> > >> avd_compglobalattrs_ccb_completed_cb(CcbUtilOperationData_t
> > >> *opdata) diff --git a/osaf/services/saf/amf/amfnd/compdb.cc
> > >> b/osaf/services/saf/amf/amfnd/compdb.cc
> > >> --- a/osaf/services/saf/amf/amfnd/compdb.cc
> > >> +++ b/osaf/services/saf/amf/amfnd/compdb.cc
> > >> @@ -889,6 +889,43 @@ done:
> > >>          return rc;
> > >>   }
> > >>
> > >> +uint32_t avnd_globalattr_oper_req(AVND_CB *cb, AVSV_PARAM_INFO
> > >> *param)
> > >> +{
> > >> +        uint32_t rc = NCSCC_RC_FAILURE;
> > >> +        TRACE_ENTER();
> > >> +
> > >> +        switch (param->act) {
> > >> +        case AVSV_OBJ_OPR_MOD: {
> > >> +                        AVND_COMP *comp = (AVND_COMP *)
> > >> ncs_patricia_tree_getnext(&cb->compdb, (uint8_t *) 0);
> > >> +                        while (comp != 0) {
> > >> +                                switch (param->attr_id) {
> > >> +                                case
> > >> saAmfNumMaxInstantiateWithoutDelay_ID: {
> > >> +                                        SaUint32T
> > >> saAmfNumMaxInstantiateWithoutDelay = *((SaUint32T *)
> > >> param->value);;
> > >> +                                        if (comp->use_comptype_attr-
> > >>> test(GlobalNumMaxInstantiateWithoutDelay)) {
> > >> +                                                comp-
> > >>> clc_info.inst_retry_max = saAmfNumMaxInstantiateWithoutDelay;
> > >> +                                                TRACE("comp-
> > >>> clc_info.inst_retry_max modified to '%u' for %s",
> > >> +                                                        comp-
> > >>> clc_info.inst_retry_max, comp->name.value);
> > >> +                                        }
> > >> +                                        break;
> > >> +                                }
> > >> +                                default:
> > >> +                                        LOG_WA("Unexpected attribute id:
> > >> %d", param->attr_id);
> > >> +                                }
> > >> +                                comp = (AVND_COMP *)
> > >> ncs_patricia_tree_getnext(&cb->compdb, (uint8_t *) &comp->name);
> > >> +                        }
> > >> +                }
> > >> +        case AVSV_OBJ_OPR_DEL: {
> > >> +                // Do nothing
> > >> +                        break;
> > >> +                }
> > >> +
> > >> +        }
> > >> +
> > >> +        TRACE_LEAVE();
> > >> +        rc = NCSCC_RC_SUCCESS;
> > >> +        return rc;
> > >> +}
> > >> +
> > >>   uint32_t avnd_comptype_oper_req(AVND_CB *cb, AVSV_PARAM_INFO
> > >> *param)
> > >>   {
> > >>          uint32_t rc = NCSCC_RC_FAILURE;
> > >> @@ -1564,8 +1601,10 @@ static int comp_init(AVND_COMP *comp, co
> > >>          }
> > >>
> > >>          if
> > >>
> >
> (immutil_getAttr(const_cast<SaImmAttrNameT>("saAmfCompNumMaxInstanti
> > >> ateWithoutDelay"), attributes,
> > >> -                            0, &comp->clc_info.inst_retry_max) != 
> > >> SA_AIS_OK)
> > > [Nagu]> Here +                        0, &comp->clc_info.inst_retry_max)
> > != SA_AIS_OK) {
> > >>                  comp->clc_info.inst_retry_max =
> > >> comp_global_attrs.saAmfNumMaxInstantiateWithoutDelay;
> > >> +                comp->use_comptype_attr-
> > >>> set(GlobalNumMaxInstantiateWithoutDelay);
> > >> +        }
> > >>
> > >>   #if 0
> > >>          //  TODO
> > >> diff --git a/osaf/services/saf/amf/amfnd/di.cc
> > >> b/osaf/services/saf/amf/amfnd/di.cc
> > >> --- a/osaf/services/saf/amf/amfnd/di.cc
> > >> +++ b/osaf/services/saf/amf/amfnd/di.cc
> > >> @@ -225,6 +225,9 @@ uint32_t avnd_evt_avd_operation_request_
> > >>          case AVSV_SA_AMF_COMP:
> > >>                  rc = avnd_comp_oper_req(cb, param);
> > >>                  break;
> > >> +        case AVSV_SA_AMF_COMP_GLOBAL_ATTR:
> > >> +                rc = avnd_globalattr_oper_req(cb, param);
> > >> +                break;
> > >>          case AVSV_SA_AMF_COMP_TYPE:
> > >>                  rc = avnd_comptype_oper_req(cb, param);
> > >>                  break;
> > >> diff --git a/osaf/services/saf/amf/amfnd/include/avnd_comp.h
> > >> b/osaf/services/saf/amf/amfnd/include/avnd_comp.h
> > >> --- a/osaf/services/saf/amf/amfnd/include/avnd_comp.h
> > >> +++ b/osaf/services/saf/amf/amfnd/include/avnd_comp.h
> > >> @@ -296,6 +296,7 @@ enum UsedComptypeAttrs {
> > >>          DefDisableRestart,
> > >>          DefQuiescingCompleteTimeout,
> > >>           CompInstantiationLevel,
> > >> +        GlobalNumMaxInstantiateWithoutDelay,
> > >>          NumAttrs
> > >>   };
> > >>
> > >> @@ -899,6 +900,7 @@ extern void avnd_mbcsv_comp_hc_rec_del(s
> > >>
> > >>   extern uint32_t avnd_comp_oper_req(struct avnd_cb_tag *cb,
> > >> AVSV_PARAM_INFO *param);
> > >>   extern uint32_t avnd_comptype_oper_req(struct avnd_cb_tag *cb,
> > >> AVSV_PARAM_INFO *param);
> > >> +extern uint32_t avnd_globalattr_oper_req(struct avnd_cb_tag *cb,
> > >> AVSV_PARAM_INFO *param);
> > >>   extern unsigned int avnd_comp_config_get_su(struct avnd_su_tag *su);
> > >>   extern int avnd_comp_config_reinit(AVND_COMP *comp);
> > >>   extern void avnd_comp_delete(AVND_COMP *comp);
> >
> >
> > ----------------------------------------------------------------------
> > --------
> > Slashdot TV.
> > Video for Nerds.  Stuff that matters.
> > http://tv.slashdot.org/
> > _______________________________________________
> > Opensaf-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/opensaf-devel

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce.
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to