Hi Hans,
Thanks for the patch. But, this change is not in scope of this ticket.
You can create a ticket for adding su in oper state and we can take test it in
those scenarios.
Thanks
-Nagu
-----Original Message-----
From: Hans Feldt [mailto:[email protected]]
Sent: 21 November 2013 02:44
To: Nagendra Kumar; Hans Nordebäck
Cc: [email protected]
Subject: RE: [devel] [PATCH 1 of 1] amfd: Reject admin op if csi add/remove is
in progress [#627]
And here's a patch that actually works (previous one didn't). Tested with
various CSI add/remove for PI/NPI comps. Please test and comment.
If avd_sg_su_oper_list_add() instead was called from inside avd_snd_susi_msg()
it would save some lines here and there.
/Hans
> -----Original Message-----
> From: Hans Feldt [mailto:[email protected]]
> Sent: den 20 november 2013 15:41
> To: Nagendra Kumar; Hans Nordebäck
> Cc: [email protected]
> Subject: Re: [devel] [PATCH 1 of 1] amfd: Reject admin op if csi
> add/remove is in progress [#627]
>
> I think SG FSM state "SU OPER" should be used for this purpose. Could you
> please test attached patch?
> It fits better into the code and no new checks needs to be added into
> admin op handling Thanks, Hans
>
> > -----Original Message-----
> > From: Nagendra Kumar [mailto:[email protected]]
> > Sent: den 20 november 2013 14:25
> > To: Hans Feldt; Hans Nordebäck
> > Cc: [email protected]
> > Subject: RE: [devel] [PATCH 1 of 1] amfd: Reject admin op if csi
> > add/remove is in progress [#627]
> >
> > Don't remember exactly, but may be because of upgrade issue for
> > adding/deleting csi, extra SG fsm state would have been
> required,
> > so not coded like typical SG fsm style.
> >
> > Thanks
> > -Nagu
> > -----Original Message-----
> > From: Hans Feldt [mailto:[email protected]]
> > Sent: 20 November 2013 18:33
> > To: Nagendra Kumar; [email protected]
> > Cc: [email protected]
> > Subject: Re: [devel] [PATCH 1 of 1] amfd: Reject admin op if csi
> > add/remove is in progress [#627]
> >
> > Usually we set the SG state non stable when operating on SUs.
> > So why isn't this "standard" mechanism used in this case?
> > Thanks,
> > Hans
> >
> > On 11/20/2013 11:05 AM, Nagendra Kumar wrote:
> > > Hi Hans N, Hans F,
> > >
> > > Any comments on this ?
> > >
> > > Thanks
> > > -Nagu
> > > -----Original Message-----
> > > From: Nagendra Kumar
> > > Sent: 14 November 2013 17:11
> > > To: [email protected]; [email protected]
> > > Cc: [email protected]
> > > Subject: [devel] [PATCH 1 of 1] amfd: Reject admin op if csi
> > > add/remove is in progress [#627]
> > >
> > > osaf/services/saf/avsv/avd/avd_csi.c | 18 ++++++++++++++++++
> > > osaf/services/saf/avsv/avd/avd_sg.c | 7 +++++++
> > > osaf/services/saf/avsv/avd/avd_si.c | 7 +++++++
> > > osaf/services/saf/avsv/avd/avd_su.c | 8 ++++++++
> > > osaf/services/saf/avsv/avd/include/avd_csi.h | 1 +
> > > 5 files changed, 41 insertions(+), 0 deletions(-)
> > >
> > >
> > > diff --git a/osaf/services/saf/avsv/avd/avd_csi.c
> > > b/osaf/services/saf/avsv/avd/avd_csi.c
> > > --- a/osaf/services/saf/avsv/avd/avd_csi.c
> > > +++ b/osaf/services/saf/avsv/avd/avd_csi.c
> > > @@ -1234,3 +1234,21 @@ void avd_csi_constructor(void)
> > > avd_class_impl_set("SaAmfCSI", NULL, NULL,
> > > csi_ccb_completed_cb, csi_ccb_apply_cb); }
> > >
> > > +/**
> > > + * @brief Check whether the Single csi assignment is undergoing
> > > on the SG.
> > > + *
> > > + * @param[in] sg - Pointer to the Service Group.
> > > + *
> > > + * @return true if operation is undergoing else false.
> > > + */
> > > +bool csi_assignment_validate(AVD_SG *sg) {
> > > + AVD_SI *temp_si;
> > > + AVD_SU_SI_REL *temp_sisu;
> > > +
> > > + for (temp_si = sg->list_of_si; temp_si; temp_si =
> > > temp_si->sg_list_of_si_next)
> > > + for (temp_sisu = temp_si->list_of_sisu; temp_sisu; temp_sisu =
> > > temp_sisu->si_next)
> > > + if (temp_sisu->csi_add_rem == true)
> > > + return true;
> > > + return false;
> > > +}
> > > diff --git a/osaf/services/saf/avsv/avd/avd_sg.c
> > > b/osaf/services/saf/avsv/avd/avd_sg.c
> > > --- a/osaf/services/saf/avsv/avd/avd_sg.c
> > > +++ b/osaf/services/saf/avsv/avd/avd_sg.c
> > > @@ -28,6 +28,7 @@
> > > #include <avd_sg.h>
> > > #include <avd_proc.h>
> > > #include <avd_si_dep.h>
> > > +#include <avd_csi.h>
> > >
> > > static NCS_PATRICIA_TREE sg_db;
> > > static void avd_verify_equal_ranked_su(AVD_SG *avd_sg); @@
> > > -1021,6 +1022,12 @@ static void
> > sg_admin_op_cb(SaImmOiHandle
> > > }
> > > }
> > >
> > > + /* Avoid if any single Csi assignment is undergoing on SG. */
> > > + if (csi_assignment_validate(sg) == true) {
> > > + rc = SA_AIS_ERR_TRY_AGAIN;
> > > + LOG_WA("Single Csi assignment undergoing on (sg'%s')",
> > > sg->name.value);
> > > + goto done;
> > > + }
> > >
> > > /* if Tolerance timer is running for any SI's withing this SG,
> > > then return SA_AIS_ERR_TRY_AGAIN */
> > > if (sg_is_tolerance_timer_running_for_any_si(sg)) { diff --git
> > > a/osaf/services/saf/avsv/avd/avd_si.c
> > > b/osaf/services/saf/avsv/avd/avd_si.c
> > > --- a/osaf/services/saf/avsv/avd/avd_si.c
> > > +++ b/osaf/services/saf/avsv/avd/avd_si.c
> > > @@ -793,6 +793,13 @@ static void si_admin_op_cb(SaImmOiHandle
> > > goto done;
> > > }
> > >
> > > + /* Avoid if any single Csi assignment is undergoing on SG. */
> > > + if (csi_assignment_validate(si->sg_of_si) == true) {
> > > + rc = SA_AIS_ERR_TRY_AGAIN;
> > > + LOG_WA("Single Csi assignment undergoing on (sg'%s')",
> > > si->sg_of_si->name.value);
> > > + goto done;
> > > + }
> > > +
> > > switch (operationId) {
> > > case SA_AMF_ADMIN_UNLOCK:
> > > if (SA_AMF_ADMIN_UNLOCKED == si->saAmfSIAdminState) {
> > > diff
> > > --git a/osaf/services/saf/avsv/avd/avd_su.c
> > > b/osaf/services/saf/avsv/avd/avd_su.c
> > > --- a/osaf/services/saf/avsv/avd/avd_su.c
> > > +++ b/osaf/services/saf/avsv/avd/avd_su.c
> > > @@ -27,6 +27,7 @@
> > > #include <avd_imm.h>
> > > #include <avd_ntf.h>
> > > #include <avd_proc.h>
> > > +#include <avd_csi.h>
> > >
> > > static NCS_PATRICIA_TREE su_db;
> > >
> > > @@ -898,6 +899,13 @@ static void su_admin_op_cb(SaImmOiHandle
> > > }
> > > }
> > >
> > > + /* Avoid if any single Csi assignment is undergoing on SG. */
> > > + if (csi_assignment_validate(su->sg_of_su) == true) {
> > > + rc = SA_AIS_ERR_TRY_AGAIN;
> > > + LOG_WA("Single Csi assignment undergoing on (sg'%s')",
> > > su->sg_of_su->name.value);
> > > + goto done;
> > > + }
> > > +
> > > if (su->sg_of_su->sg_fsm_state != AVD_SG_FSM_STABLE) {
> > > rc = SA_AIS_ERR_TRY_AGAIN;
> > > LOG_WA("SG state is not stable"); /* whatever that
> > > means... */
> > > diff --git a/osaf/services/saf/avsv/avd/include/avd_csi.h
> > > b/osaf/services/saf/avsv/avd/include/avd_csi.h
> > > --- a/osaf/services/saf/avsv/avd/include/avd_csi.h
> > > +++ b/osaf/services/saf/avsv/avd/include/avd_csi.h
> > > @@ -159,5 +159,6 @@ extern void avd_compcsi_from_csi_and_sus
> > > extern void avd_csi_delete(struct avd_csi_tag *csi); extern void
> > > csi_cmplt_delete(struct avd_csi_tag *csi, SaBoolT ckpt); extern
> > > AVD_CSI *csi_create(const SaNameT *csi_name);
> > > +extern bool csi_assignment_validate(struct avd_sg_tag *sg);
> > >
> > > #endif
> > >
> > > ------------------------------------------------------------------
> > > ----
> > > -------- DreamFactory - Open Source REST & JSON Services for HTML5
> > > & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and
> > > External API Access Free app hosting. Or install the open source
> > package on any LAMP server.
> > > Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
> > > http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/os
> > > tg.c lktrk _______________________________________________
> > > Opensaf-devel mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/opensaf-devel
> > >
> > >
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel