When IMMND exits before IMMD, it has a chance for IMMD to elect new
coordinator and then IMMD goes down. There are 2 events on node which
has elected IMMND: INTRO_RSP and MDS_DOWN of IMMD. Because the priority
of MDS_DOWN is higher than INTRO_RSP, IMMND handles MDS_DOWN event first
and then it handles INTRO_RSP event to become a new coordinator. After
IMMD is up again, other IMMNDs (except previous coordinator) try to send
INTRO message to IMMD for coordinator election. As a result, 2
coordinators exists. The solution for this issue is to drop INTRO_RSP
message when IMMD has not been up yet.
---
 src/imm/immnd/immnd_evt.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/imm/immnd/immnd_evt.c b/src/imm/immnd/immnd_evt.c
index 2b9123d..730c490 100644
--- a/src/imm/immnd/immnd_evt.c
+++ b/src/imm/immnd/immnd_evt.c
@@ -10461,6 +10461,11 @@ static uint32_t immnd_evt_proc_intro_rsp(IMMND_CB *cb, 
IMMND_EVT *evt,
        TRACE_ENTER2("evt->info.ctrl.nodeId(%x) != cb->node_id:(%x) ?%u",
                     evt->info.ctrl.nodeId, cb->node_id,
                     evt->info.ctrl.nodeId != cb->node_id);
+       if (!immnd_is_immd_up(cb)) {
+         LOG_WA("IMMD has not been UP yet. Drop INTRO_RSP message.");
+         return NCSCC_RC_SUCCESS;
+       }
+
        cb->mNumNodes++;
        TRACE("immnd_evt_proc_intro_rsp cb->mNumNodes: %u", cb->mNumNodes);
        LOG_IN("immnd_evt_proc_intro_rsp: epoch:%i rulingEpoch:%u",
-- 
2.7.4


------------------------------------------------------------------------------
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