Hi Huu, See comment inline.
Best Regards, Thien -----Original Message----- From: Huu The Truong <huu.t.tru...@dektech.com.au> Sent: Thursday, September 23, 2021 4:32 PM To: Thang Duc Nguyen <thang.d.ngu...@dektech.com.au>; Minh Hon Chau <minh.c...@dektech.com.au>; Thien Minh Huynh <thien.m.hu...@dektech.com.au>; Surbhi Tripathi <surbhi.tripa...@dektech.com.au> Cc: opensaf-devel@lists.sourceforge.net; Huu The Truong <huu.t.tru...@dektech.com.au> Subject: [PATCH 1/1] immd: failed to find candidate for new immnd coordinator [#3284] Some cases, standby SC cannot promote to be coordinator, since isOnController variable in immnd tree is not "true". In order to prevent that, in function immd_proc_elect_coord() does not need check isOnController condition, because in fact the immd knew which one in all SCs is became active SC by cb->node_id variable --- src/imm/immd/immd_proc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/imm/immd/immd_proc.c b/src/imm/immd/immd_proc.c index a56ce89eb..ac413e119 100644 --- a/src/imm/immd/immd_proc.c +++ b/src/imm/immd/immd_proc.c @@ -344,12 +344,13 @@ bool immd_proc_elect_coord(IMMD_CB *cb, bool new_active) // 3) Coordinator on PL node if SC absence is allowed. while (immnd_info_node) { key = immnd_info_node->immnd_dest; - if ((immnd_info_node->isOnController) && - (immnd_info_node->epoch == cb->mRulingEpoch)) { - candidate_coord_node = immnd_info_node; + if (immnd_info_node->epoch == cb->mRulingEpoch) { if (immnd_info_node->immnd_key == cb->node_id) { /* Found a new candidate on active SC */ + candidate_coord_node = immnd_info_node; [thien]: should correct isOnController=true when you ignore checking for active SC. break; + } else if (immnd_info_node->isOnController) { + candidate_coord_node = immnd_info_node; } } -- 2.25.1 _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel