Hi Hans,

Case 1: First AMF node is LOCKed and then subsequently perform 'opensafd stop':
In this case, the 'unassigned alarms' for application SIs would have been 
previously sent as a part of LOCK itself.
Therefore, the 'unassigned alarms' will *not be sent again* as a part of the 
'opensafd stop'.
The 'unassigned alarms' will *not be sent* for middleware SIs during both 
operations.

Case 2: AMF node is not LOCKed but directly perform 'opensafd stop':
In this case, the 'unassigned alarms' for application SI have to be sent as a 
part of the 'opensafd stop'.
As well as 'unassigned alarms' for the middleware *will be sent* as a part of 
the 'opensafd stop'.

Case 3: AMF node is *LOCKed*, and a node goes for a node failfast 
because of escalation caused by fault in 'any' component on that node:
In this case also, we should send the 'unassigned alarm' for application as 
well as middleware.
I guess this case 3 needs to be handled in this patch or in a different ticket.

p.s.: (However, note that the valid use case for directly performing 'opensafd 
stop' is when the
opensafd rc script is invoked as a part of the OS shutdown.)

Thanks,
-Nagu

> -----Original Message-----
> From: Hans Nordebäck [mailto:[email protected]]
> Sent: 16 September 2015 12:57
> To: Nagendra Kumar; Praveen Malviya; [email protected]
> Cc: [email protected]
> Subject: Re: [PATCH 1 of 1] amfd: Don't send alarm SI has no current active
> assignments if node is locked V3 [#1465]
> 
> Hi Nagu,
> 
> yes, I'll change that, but one problem is the application SI's getting the SI
> unassigned alarm when doing shutdown on a node, this is not wanted, so the
> check for M/W should be removed.
> 
> /Thanks HansN
> 
> On 09/16/2015 08:44 AM, Nagendra Kumar wrote:
> > Hi Hans N,
> > Two comments:
> >
> > 1. This patch removes the check of ' sg_of_si->sg_ncs_spec == true ' in
> si.cc. I thought this check was fine.
> > 2. The changes in siass.cc should be like:
> > +            if (sg_of_si->sg_ncs_spec == true &&
> > +           (sg_of_si->sg_type->saAmfSgtRedundancyModel ==
> SA_AMF_NO_REDUNDANCY_MODEL)) {
> > +           si->si_on_node = su->su_on_node;
> > +           si->curr_su = su;
> > +   }
> >
> > Thanks
> > -Nagu
> >
> >> -----Original Message-----
> >> From: Hans Nordeback [mailto:[email protected]]
> >> Sent: 15 September 2015 18:51
> >> To: Praveen Malviya; Nagendra Kumar; [email protected]
> >> Cc: [email protected]
> >> Subject: [PATCH 1 of 1] amfd: Don't send alarm SI has no current
> >> active assignments if node is locked V3 [#1465]
> >>
> >>   osaf/services/saf/amf/amfd/include/si.h |   2 ++
> >>   osaf/services/saf/amf/amfd/si.cc        |  22 ++++++++++++++++++----
> >>   osaf/services/saf/amf/amfd/siass.cc     |   3 +++
> >>   3 files changed, 23 insertions(+), 4 deletions(-)
> >>
> >>
> >> To perform scalein, shutdown is performed on a nodegroup. No-red
> >> application SI's are receiving alarm "SI has no current active
> >> assignments" which is not wanted at scalein.
> >> Thereafter OpenSAF is stopped via opensafd stop, the M/W No-red SI's
> >> are receiving "SI has no current active assignments" which is not
> >> wanted at scalein.
> >>
> >> diff --git a/osaf/services/saf/amf/amfd/include/si.h
> >> b/osaf/services/saf/amf/amfd/include/si.h
> >> --- a/osaf/services/saf/amf/amfd/include/si.h
> >> +++ b/osaf/services/saf/amf/amfd/include/si.h
> >> @@ -108,6 +108,8 @@ public:
> >>
> >>    bool alarm_sent; /* SI unassigned alarm has been sent */
> >>
> >> +  AVD_AVND *si_on_node; /* the node on which this SI resides */
> >> +  AVD_SU *curr_su; /* the SU with the latest assignment*/
> >>    void inc_curr_act_ass();
> >>    void dec_curr_act_ass();
> >>    void inc_curr_stdby_ass();
> >> diff --git a/osaf/services/saf/amf/amfd/si.cc
> >> b/osaf/services/saf/amf/amfd/si.cc
> >> --- a/osaf/services/saf/amf/amfd/si.cc
> >> +++ b/osaf/services/saf/amf/amfd/si.cc
> >> @@ -26,6 +26,7 @@
> >>   #include <csi.h>
> >>   #include <proc.h>
> >>   #include <si_dep.h>
> >> +#include <node.h>
> >>
> >>   AmfDb<std::string, AVD_SI> *si_db = NULL;
> >>
> >> @@ -319,7 +320,9 @@ AVD_SI::AVD_SI() :
> >>    list_of_sus_per_si_rank(NULL),
> >>    rankedsu_list_head(NULL),
> >>    invocation(0),
> >> -  alarm_sent(false)
> >> +  alarm_sent(false),
> >> +  si_on_node{nullptr},
> >> +  curr_su{nullptr}
> >>   {
> >>    memset(&name, 0, sizeof(SaNameT));
> >>    memset(&saAmfSvcType, 0, sizeof(SaNameT)); @@ -1314,9
> +1317,20 @@
> >> void AVD_SI::update_ass_state()
> >>
> >>            /* alarm & notifications */
> >>            if (saAmfSIAssignmentState ==
> >> SA_AMF_ASSIGNMENT_UNASSIGNED) {
> >> -                  avd_send_si_unassigned_alarm(&name);
> >> -                  alarm_sent = true;
> >> -                  m_AVSV_SEND_CKPT_UPDT_ASYNC_UPDT(avd_cb,
> >> this, AVSV_CKPT_SI_ALARM_SENT);
> >> +                  osafassert(si_on_node != nullptr);
> >> +                  osafassert(curr_su != nullptr);
> >> +                  if ((sg_of_si->sg_type->saAmfSgtRedundancyModel
> ==
> >> SA_AMF_NO_REDUNDANCY_MODEL) &&
> >> +                      (curr_su->saAmfSUPresenceState !=
> >> SA_AMF_PRESENCE_INSTANTIATION_FAILED) &&
> >> +                      (curr_su->saAmfSUPresenceState !=
> >> SA_AMF_PRESENCE_TERMINATION_FAILED) &&
> >> +                      ((si_on_node->saAmfNodeAdminState ==
> >> SA_AMF_ADMIN_SHUTTING_DOWN) ||
> >> +                       (si_on_node->saAmfNodeAdminState ==
> >> SA_AMF_ADMIN_LOCKED) ||
> >> +                       (si_on_node->saAmfNodeAdminState ==
> >> SA_AMF_ADMIN_LOCKED_INSTANTIATION))) {
> >> +                          LOG_NO("Node is locked, no SI unassigned
> >> alarm will be sent");
> >> +                  } else {
> >> +                          avd_send_si_unassigned_alarm(&name);
> >> +                          alarm_sent = true;
> >> +
> >>    m_AVSV_SEND_CKPT_UPDT_ASYNC_UPDT(avd_cb, this,
> >> AVSV_CKPT_SI_ALARM_SENT);
> >> +                  }
> >>            }
> >>            else {
> >>                    avd_send_si_assigned_ntf(&name, oldState,
> >> saAmfSIAssignmentState); diff --git
> >> a/osaf/services/saf/amf/amfd/siass.cc
> >> b/osaf/services/saf/amf/amfd/siass.cc
> >> --- a/osaf/services/saf/amf/amfd/siass.cc
> >> +++ b/osaf/services/saf/amf/amfd/siass.cc
> >> @@ -166,6 +166,9 @@ AVD_SU_SI_REL *avd_susi_create(AVD_CL_CB
> >>    su_si->si = si;
> >>    su_si->su = su;
> >>
> >> +  si->si_on_node = su->su_on_node;
> >> +  si->curr_su = su;
> >> +
> >>    /*
> >>     * Add the susi rel rec to the ordered si-list
> >>     */
> 

------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to