osaf/services/saf/amf/amfd/main.cc |  14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)


When Amfd becomes Act, it is calling node failover
function for those nodes also, which were already gone down
and already failover has been performed by older Act Amfd.
This needs to be avoided.

diff --git a/osaf/services/saf/amf/amfd/main.cc 
b/osaf/services/saf/amf/amfd/main.cc
--- a/osaf/services/saf/amf/amfd/main.cc
+++ b/osaf/services/saf/amf/amfd/main.cc
@@ -405,8 +405,20 @@ static void handle_event_in_failover_sta
                for (std::map<uint32_t, AVD_AVND *>::const_iterator it = 
node_id_db->begin();
                                it != node_id_db->end(); it++) {
                        AVD_AVND *node = it->second;
+                       bool fover_done = false;
                        if (AVD_AVND_STATE_ABSENT == node->node_state) {
-                               avd_node_failover(node);
+                               /* Check whether this node failover has been
+                                  performed or not. */
+                               for (AVD_SU *i_su = node->list_of_ncs_su; i_su;
+                                               i_su = i_su->avnd_list_su_next) 
{
+                                       if 
((i_su->sg_of_su->sg_redundancy_model == SA_AMF_NO_REDUNDANCY_MODEL) &&
+                                                       (i_su->list_of_susi == 
NULL)) {
+                                               fover_done = true;
+                                               break;
+                                       }
+                               }
+                               if (fover_done == false)
+                                       avd_node_failover(node);
                        }
                }
                /* Since we are sending lots of async update to its peer from

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to