Since patch is retaining the older values in case of delete, so that should be ok in case sg is unlock. A notice/warning log is required to be kept to inform user about the same.
Thanks -Nagu > -----Original Message----- > From: Hans Feldt [mailto:[email protected]] > Sent: 15 May 2014 17:45 > To: Nagendra Kumar; Alex Jones; Praveen Malviya > Cc: [email protected] > Subject: RE: [PATCH 1 of 1] amfd: allow change to saAmfSGNumPrefActiveSUs > for N+M SG while UNLOCKED [#871] > > Yeah OK but the default is one(1). Should it be reverted to that or it so > that we > can't allow to decrease this value? > /Hans > > > -----Original Message----- > > From: Nagendra Kumar [mailto:[email protected]] > > Sent: den 15 maj 2014 14:00 > > To: Hans Feldt; Alex Jones; Praveen Malviya > > Cc: [email protected] > > Subject: RE: [PATCH 1 of 1] amfd: allow change to > > saAmfSGNumPrefActiveSUs for N+M SG while UNLOCKED [#871] > > > > There is no value corresponding to it in sgtype. > > > > > -----Original Message----- > > > From: Hans Feldt [mailto:[email protected]] > > > Sent: 15 May 2014 17:22 > > > To: Nagendra Kumar; Alex Jones; Praveen Malviya > > > Cc: [email protected] > > > Subject: RE: [PATCH 1 of 1] amfd: allow change to > > > saAmfSGNumPrefActiveSUs for N+M SG while UNLOCKED [#871] > > > > > > > > > if (value_is_deleted) > > > sg->saAmfSGNumPrefActiveSUs = sg-saAmfSGNumPrefActiveSUs; > > > > > > shouldn't it reset the value from the SgType? > > > > > > Thanks, > > > Hans > > > > > > > -----Original Message----- > > > > From: Nagendra Kumar [mailto:[email protected]] > > > > Sent: den 15 maj 2014 13:56 > > > > To: Alex Jones; Hans Feldt; Praveen Malviya > > > > Cc: [email protected] > > > > Subject: RE: [PATCH 1 of 1] amfd: allow change to > > > > saAmfSGNumPrefActiveSUs for N+M SG while UNLOCKED [#871] > > > > > > > > Ok, keep a notice log. Ack. > > > > > > > > Thanks > > > > -Nagu > > > > > -----Original Message----- > > > > > From: Alex Jones [mailto:[email protected]] > > > > > Sent: 13 May 2014 20:29 > > > > > To: Nagendra Kumar; [email protected]; Praveen Malviya > > > > > Cc: [email protected] > > > > > Subject: Re: [PATCH 1 of 1] amfd: allow change to > > > > > saAmfSGNumPrefActiveSUs for N+M SG while UNLOCKED [#871] > > > > > > > > > > Oh. That is really to disallow deleting the attribute. Do I even > > > > > need it? > > > > > > > > > > Alex > > > > > > > > > > On 05/13/2014 02:15 AM, Nagendra Kumar wrote: > > > > > > Hi Alex, > > > > > > I couldn't get the below change: > > > > > > > > > > > > + if (value_is_deleted) > > > > > > + sg- > >saAmfSGNumPrefActiveSUs = sg- > > > > > >saAmfSGNumPrefActiveSUs; > > > > > > + else > > > > > > > > > > > > Thanks > > > > > > -Nagu > > > > > > > > > > > >> -----Original Message----- > > > > > >> From: Alex Jones [mailto:[email protected]] > > > > > >> Sent: 13 May 2014 00:36 > > > > > >> To: [email protected]; Nagendra Kumar; Praveen Malviya > > > > > >> Cc: [email protected] > > > > > >> Subject: [PATCH 1 of 1] amfd: allow change to > > > > > >> saAmfSGNumPrefActiveSUs for > > > > > >> N+M SG while UNLOCKED [#871] > > > > > >> > > > > > >> osaf/services/saf/amf/amfd/sg.cc | 39 > > > > > >> +++++++++++++++++++++++++++++++++++++++ > > > > > >> 1 files changed, 39 insertions(+), 0 deletions(-) > > > > > >> > > > > > >> > > > > > >> ccb_completed_modify_hdlr: Attribute 'saAmfSGNumPrefActiveSUs' > > > > > >> cannot be modified when SG is unlocked > > > > > >> > > > > > >> OpenSAF disallows changing saAmfSGNumPrefActiveSUs while the > > > > > >> SG is UNLOCKED. > > > > > >> This prevents in-service capacity upgrade for N+M models, > > > > > >> which is not desirable. > > > > > >> > > > > > >> This change allows saAmfSGNumPrefActiveSUs to be increased > > > > > >> for > > > > > >> N+M models, as long as there are instantiated spare SUs equal > > > > > >> N+to > > > > > >> the amount of the increase. > > > > > >> These instantiated spare SUs will then be assigned ACTIVE, > > > > > >> and their corresponding CSIs will be assigned to the STANDBY. > > > > > >> > > > > > >> diff --git a/osaf/services/saf/amf/amfd/sg.cc > > > > > >> b/osaf/services/saf/amf/amfd/sg.cc > > > > > >> --- a/osaf/services/saf/amf/amfd/sg.cc > > > > > >> +++ b/osaf/services/saf/amf/amfd/sg.cc > > > > > >> @@ -675,6 +675,33 @@ static SaAisErrorT ccb_completed_modify_ > > > > > >> rc = > SA_AIS_ERR_BAD_OPERATION; > > > > > >> goto done; > > > > > >> } > > > > > >> + } else if (!strcmp(attribute->attrName, > > > > > >> "saAmfSGNumPrefActiveSUs")) { > > > > > >> + uint32_t pref_active_su = > > > > > >> *static_cast<SaUint32T *>(value); > > > > > >> + > > > > > >> + if (sg->sg_redundancy_model != > > > > > >> SA_AMF_NPM_REDUNDANCY_MODEL) { > > > > > >> + > > > report_ccb_validation_error(opdata, > > > > > >> + "%s: > > > > > >> saAmfSGNumPrefActiveSUs for non-N+M model cannot" > > > > > >> + " be modified when > > > SG is > > > > > >> unlocked", __FUNCTION__); > > > > > >> + rc = > > > SA_AIS_ERR_BAD_OPERATION; > > > > > >> + goto done; > > > > > >> + } else if (pref_active_su < sg- > > > > > >>> saAmfSGNumPrefActiveSUs) { > > > > > >> + > > > report_ccb_validation_error(opdata, > > > > > >> + "%s: Cannot decrease > > > > > >> saAmfSGNumPrefActiveSUs while SG" > > > > > >> + " is unlocked ", > > > > > >> __FUNCTION__); > > > > > >> + rc = > > > SA_AIS_ERR_BAD_OPERATION; > > > > > >> + goto done; > > > > > >> + } else { > > > > > >> + uint32_t increase_amount = > > > > > >> pref_active_su - sg->saAmfSGNumPrefActiveSUs; > > > > > >> + > > > > > >> + if (sg- > > > > > >>> saAmfSGNumCurrInstantiatedSpareSUs < increase_amount) { > > > > > >> + > > > > > >> report_ccb_validation_error(opdata, > > > > > >> + "%s: Not > > > enough > > > > > >> instantiated spare SUs to do" > > > > > >> + " in-service > > > increase > > > > > >> of saAmfSGNumPrefActiveSUs", > > > > > >> + > > > __FUNCTION__); > > > > > >> + rc = > > > > > >> SA_AIS_ERR_BAD_OPERATION; > > > > > >> + goto done; > > > > > >> + } > > > > > >> + } > > > > > >> } else { > > > > > >> report_ccb_validation_error(opdata, > > > > > >> "%s: Attribute '%s' cannot be > modified > > > > > when SG is unlocked", > > > > > >> @@ -1010,6 +1037,18 @@ static void > ccb_apply_modify_hdlr(CcbUti > > > > > >> sg->name.value, sg- > > > > > >>> saAmfSGAutoRepair); > > > > > >> } else if (!strcmp(attribute->attrName, > > > > > >> "saAmfSGSuHostNodeGroup")) { > > > > > >> sg->saAmfSGSuHostNodeGroup = > *((SaNameT > > > > > *)value); > > > > > >> + } else if (!strcmp(attribute->attrName, > > > > > >> "saAmfSGNumPrefActiveSUs")) { > > > > > >> + if (value_is_deleted) > > > > > >> + sg- > > > >saAmfSGNumPrefActiveSUs = sg- > > > > > >>> saAmfSGNumPrefActiveSUs; > > > > > >> + else > > > > > >> + sg- > > > >saAmfSGNumPrefActiveSUs = > > > > > >> *static_cast<SaUint32T *>(value); > > > > > >> + > > > > > >> + if (avd_cb->avail_state_avd == > > > > > >> SA_AMF_HA_ACTIVE) { > > > > > >> + /* find an instantiated spare > > > SU */ > > > > > >> + if (sg->realign(avd_cb, sg) != > > > > > >> NCSCC_RC_SUCCESS) { > > > > > >> + osafassert(0); > > > > > >> + } > > > > > >> + } > > > > > >> } else { > > > > > >> osafassert(0); > > > > > >> } > > > > > >> > > > > > ------------------------------------------------------------------------------ "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 [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel
