osaf/services/saf/amf/amfnd/su.cc |  17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)


Problem: If the timer is started, delete the model, load model again,
and kill component in order to escalate to the su restart. Then if the
previous timer event comes during the escalation, it will reset component
restart counter. So there will be no su restart at the end. The similiar problem
also happens in case of saAmfSGSuRestartProb.

Change: Stop both timer saAmfSGCompRestartProb and saAmfSGSuRestartProb (if it 
started)
in the sequence of lock-in su

diff --git a/osaf/services/saf/amf/amfnd/su.cc 
b/osaf/services/saf/amf/amfnd/su.cc
--- a/osaf/services/saf/amf/amfnd/su.cc
+++ b/osaf/services/saf/amf/amfnd/su.cc
@@ -555,13 +555,28 @@ uint32_t avnd_su_curr_info_del(AVND_CB *
 
        /* reset err-esc param & oper state (if su is healthy) */
        if (!m_AVND_SU_IS_FAILED(su)) {
+               if (su->su_err_esc_tmr.is_active == true) {
+                       /* Stop saAmfSGSuRestartProb timer if started */
+                       if (su->su_err_esc_level == AVND_ERR_ESC_LEVEL_1) {
+                               m_AVND_TMR_SU_ERR_ESC_STOP(cb, su);
+                               m_AVND_SEND_CKPT_UPDT_ASYNC_UPDT(cb, su, 
AVND_CKPT_SU_ERR_ESC_TMR);
+                       }
+                       /* Stop saAmfSGCompRestartProb timer if started */
+                       else if (su->su_err_esc_level == AVND_ERR_ESC_LEVEL_0) {
+                               m_AVND_TMR_COMP_ERR_ESC_STOP(cb, su);
+                               m_AVND_SEND_CKPT_UPDT_ASYNC_UPDT(cb, su, 
AVND_CKPT_SU_ERR_ESC_TMR);
+                       }
+                       else
+                               TRACE("su_err_esc_tmr is started in wrong 
su_err_esc_level(%d)", su->su_err_esc_level);
+               }
+
+
                su->su_err_esc_level = AVND_ERR_ESC_LEVEL_0;
                su->comp_restart_cnt = 0;
                su_reset_restart_count_in_comps(su);
                su->su_restart_cnt = 0;
                avnd_di_uns32_upd_send(AVSV_SA_AMF_SU, saAmfSURestartCount_ID, 
&su->name, su->su_restart_cnt);
                m_AVND_SEND_CKPT_UPDT_ASYNC_UPDT(cb, su, AVND_CKPT_SU_CONFIG);
-               /* stop su_err_esc_tmr TBD Later */
 
                /* disable the oper state (if pi su) */
                if (m_AVND_SU_IS_PREINSTANTIABLE(su)) {

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to