osaf/services/saf/amf/amfnd/chc.cc |  13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)


In the reported problem Command Based HC was invoked for a NPI component in 
termination phase.

Before terminating/cleaning up a NPI comp, AMFND stops timer for periodically
invoking command based health check for it. At the time of launching 
TERMINATE/CLEANUP
command, if already invoked Health Check command is in progress then its 
response may
come during the termination phase and AMFND may start timer for invoking the 
command again.

If comp is not found instantiated then do not start health check timer again.
Exit status of any pending Terminate/cleanup scripts will take care of comp's 
fault management.

diff --git a/osaf/services/saf/amf/amfnd/chc.cc 
b/osaf/services/saf/amf/amfnd/chc.cc
--- a/osaf/services/saf/amf/amfnd/chc.cc
+++ b/osaf/services/saf/amf/amfnd/chc.cc
@@ -788,6 +788,19 @@ void avnd_comp_hc_cmd_restart(AVND_COMP 
        if(rec == nullptr)
                return;
 
+       /*
+          Before terminating/cleaning up a NPI comp, AMFND stops timer for 
periodically
+          invoking command based health check for it. At the time of launching 
TERMINATE/CLEANUP
+          command, if already invoked Health Check command is in progress then 
its response may 
+          come during the termination phase . If comp is not found 
instantiated then do not start 
+          health check timer again.  Exit status of any pending 
Terminate/cleanup scripts will 
+          take care of comp's fault management.
+        */
+       if (!m_AVND_COMP_PRES_STATE_IS_INSTANTIATED(comp)) {
+               TRACE_1("'%s' not instantiated, not starting Command based HC 
timer",comp->name.value);
+               rec->status = AVND_COMP_HC_STATUS_STABLE;
+               return;
+       }
        if (rec->status == AVND_COMP_HC_STATUS_SND_TMR_EXPD) {
                uint32_t rc = avnd_start_tmr(avnd_cb, &rec->tmr, AVND_TMR_HC, 
rec->period, rec->opq_hdl);
                osafassert(rc == NCSCC_RC_SUCCESS);

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to