Hi Thuan,
the role_ being checked in this PromoteNode thread can be changed to
QUIESCED from SetPeerState() in mainthead, it could happen due to a race
of thread, timing of mds msg, thus rde will not promote the node. I
think we can read role_ in mainthread, where the thread PromoteNode is
started, and pass it to PromoteNode, to avoid the role_ being changed.
Would it still work?
Thanks
Minh
On 21/5/20 2:52 pm, thuan.tran wrote:
Node already give up promotion has set role to QUIESCED should not
promote active anyway, it will cause dual active controllers.
---
src/rde/rded/role.cc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/rde/rded/role.cc b/src/rde/rded/role.cc
index a3a969b66..8c941b55d 100644
--- a/src/rde/rded/role.cc
+++ b/src/rde/rded/role.cc
@@ -110,6 +110,10 @@ void Role::PromoteNode(const uint64_t cluster_size,
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) {
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel