Hi David, Please help ACK the review as you have verified the patch. Thank you.
P/S: you can give comment if any. Best Regards, ThuanTr -----Original Message----- From: Thuan Tran <thuan.t...@dektech.com.au> Sent: Monday, May 25, 2020 5:40 PM To: Minh Hon Chau <minh.c...@dektech.com.au>; Thang Duc Nguyen <thang.d.ngu...@dektech.com.au>; Gary Lee <gary....@dektech.com.au> Cc: opensaf-devel@lists.sourceforge.net; Thuan Tran <thuan.t...@dektech.com.au> Subject: [PATCH 1/1] rde: avoid dual active controllers in relax promotion mode [#3188] - Node already give up promotion has set role to QUIESCED should not promote active anyway, it will cause dual active controllers. - Node fail promote active with consensus with error exist should set role as QUIESCED if current role is UNDEFINED. --- src/rde/rded/role.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/rde/rded/role.cc b/src/rde/rded/role.cc index 06c346ced..208ae2364 100644 --- a/src/rde/rded/role.cc +++ b/src/rde/rded/role.cc @@ -107,9 +107,14 @@ void Role::PromoteNode(const uint64_t cluster_size, rc = consensus_service.PromoteThisNode(true, cluster_size); if (rc == SA_AIS_ERR_EXIST) { LOG_WA("Another controller is already active"); + if (role() == PCS_RDA_UNDEFINED) SetRole(PCS_RDA_QUIESCED); return; } else if (rc != SA_AIS_OK && relaxed_mode == true) { LOG_WA("Unable to set active controller in consensus service"); + if (role() == PCS_RDA_QUIESCED) { + LOG_WA("Another controller is already promoted"); + return; + } LOG_WA("Will become active anyway"); promotion_pending = true; } else if (rc != SA_AIS_OK) { -- 2.17.1 _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel