Ack

Thanks
-Nagu

-----Original Message-----
From: Praveen Malviya 
Sent: 23 July 2013 18:13
To: [email protected]; Nagendra Kumar; [email protected]
Cc: [email protected]
Subject: [PATCH 1 of 1] amfd: update assignment counters when component faults 
during shutdown op [#307]

 osaf/services/saf/avsv/avd/avd_sgproc.cc |  30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)


Unlike active, quiesced and standby HA states, assignment counters in quiescing 
HA state are updated when AMFD receives assignment response from AMFND. If a 
component faults with sufailover or nodefailover recovery when shutdown 
operation is in progress then AMFD will not receive assignment response from 
AMFND. This patch will update assignment counters when component fault leads to 
sufailover of nodefailover during shutdown operation.

diff --git a/osaf/services/saf/avsv/avd/avd_sgproc.cc 
b/osaf/services/saf/avsv/avd/avd_sgproc.cc
--- a/osaf/services/saf/avsv/avd/avd_sgproc.cc
+++ b/osaf/services/saf/avsv/avd/avd_sgproc.cc
@@ -271,6 +271,20 @@ static uint32_t sg_su_failover_func(AVD_
 
        /*If the AvD is in AVD_APP_STATE then reassign all the SUSI assignments 
for this SU */
        if (avd_cb->init_state == AVD_APP_STATE) {
+               /* Unlike active, quiesced and standby HA states, assignment 
counters
+                  in quiescing HA state are updated when AMFD receives 
assignment 
+                  response from AMFND. During sufailover amfd will not receive 
+                  assignment response from AMFND. 
+                  So if any SU is under going modify operation then update 
assignment 
+                  counters for those SUSIs which are in quiescing state in the 
SU.
+                */ 
+               for (AVD_SU_SI_REL *susi = su->list_of_susi; susi; susi = 
susi->su_next) {
+                       if ((susi->fsm == AVD_SU_SI_STATE_MODIFY) &&
+                                       (susi->state == SA_AMF_HA_QUIESCING)) {
+                               avd_susi_update_assignment_counters(susi, 
AVSV_SUSI_ACT_MOD,
+                                               SA_AMF_HA_QUIESCING, 
SA_AMF_HA_QUIESCED);
+                       }
+               }
                su->sg_of_su->node_fail(avd_cb, su);
                avd_sg_su_asgn_del_util(avd_cb, su, true, false);
        }
@@ -1542,6 +1556,22 @@ void avd_node_down_appl_susi_failover(AV
        if (cb->init_state == AVD_APP_STATE) {
                i_su = avnd->list_of_su;
                while (i_su != NULL) {
+
+                       /* Unlike active, quiesced and standby HA states, 
assignment counters
+                          in quiescing HA state are updated when AMFD receives 
assignment 
+                          response from AMFND. During nodefailover amfd will 
not receive 
+                          assignment response from AMFND. 
+                          So if any SU is under going modify operation then 
update assignment 
+                          counters for those SUSIs which are in quiescing 
state in the SU.
+                        */ 
+                       for (AVD_SU_SI_REL *susi = i_su->list_of_susi; susi; 
susi = susi->su_next) {
+                               if ((susi->fsm == AVD_SU_SI_STATE_MODIFY) &&
+                                               (susi->state == 
SA_AMF_HA_QUIESCING)) {
+                                       
avd_susi_update_assignment_counters(susi, AVSV_SUSI_ACT_MOD,
+                                                       SA_AMF_HA_QUIESCING, 
SA_AMF_HA_QUIESCED);
+                               }
+                       }
+
                        /* Now analyze the service group for the new HA state
                         * assignments and send the SU SI assign messages
                         * accordingly.

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to