When active or standby nodes are introduced with request message, there is no 
need to wait more for requesting the active role.
When standby node is introduced, then we are sure that there is an active node 
somewhere in the cluster. So, changing the peer state is safe.
---
 src/rde/rded/rde_main.cc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/rde/rded/rde_main.cc b/src/rde/rded/rde_main.cc
index e939517..40d5d8e 100644
--- a/src/rde/rded/rde_main.cc
+++ b/src/rde/rded/rde_main.cc
@@ -103,7 +103,10 @@ static void handle_mbx_event() {
       LOG_NO("Got peer info request from node 0x%x with role %s",
              msg->fr_node_id, Role::to_string(msg->info.peer_info.ha_role));
       CheckForSplitBrain(msg);
-      role->SetPeerState(msg->info.peer_info.ha_role, msg->fr_node_id);
+      if(msg->info.peer_info.ha_role == PCS_RDA_ACTIVE
+          || msg->info.peer_info.ha_role == PCS_RDA_STANDBY) {
+        role->SetPeerState(msg->info.peer_info.ha_role, msg->fr_node_id);
+      }
       SendPeerInfoResp(msg->fr_dest);
       break;
     }
-- 
1.9.1


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to