Hi Minh,
Ack(code review only).
Thanks
-Nagu
-----Original Message-----
From: Minh Chau [mailto:[email protected]]
Sent: 16 October 2018 03:46
To: [email protected]; [email protected];
[email protected]
Cc: [email protected]; Minh Chau
Subject: [PATCH 2/2] amfd: Remove sending node reboot in 2N SG for
duplicated assignment [#2929]
The first part of #2929 which has introduced EXCESSIVE susi fms state,
it also handles the duplicated 2N assignments so that the node that has
duplicated assignments will be reboot.
This patch removes the sending node reboot in avd_sg_2n_act_susi(), or
amfd will send multiple node reboot to the same node otherwise. This
patch also checks the duplicated QUIESCED assignments.
---
src/amf/amfd/sg_2n_fsm.cc | 34 +++++++---------------------------
1 file changed, 7 insertions(+), 27 deletions(-)
diff --git a/src/amf/amfd/sg_2n_fsm.cc b/src/amf/amfd/sg_2n_fsm.cc
index f919291..72edf9d 100644
--- a/src/amf/amfd/sg_2n_fsm.cc
+++ b/src/amf/amfd/sg_2n_fsm.cc
@@ -598,41 +598,21 @@ static AVD_SU_SI_REL *avd_sg_2n_act_susi(AVD_CL_CB
*cb, AVD_SG *sg,
standby. */
if ((SA_AMF_HA_QUIESCED == avd_su_state_determine(su_1)) &&
(SA_AMF_HA_QUIESCED == avd_su_state_determine(su_2))) {
- osafassert(a_susi_1->su == s_susi_2->su);
- osafassert(a_susi_2->su == s_susi_1->su);
+ if(a_susi_1->su != s_susi_2->su || a_susi_2->su == s_susi_1->su) {
+ // Duplicate 2N quiesced assignments found
+ LOG_WA("Duplicate 2N quiesced assignments exist in '%s' and '%s'",
+ s_susi_1->su->name.c_str(), s_susi_2->su->name.c_str());
+ }
} else {
if (a_susi_1->su != a_susi_2->su) {
// Duplicate 2N active assignments found, probably after split
brain
- // Reboot both nodes hosting the SUs to recover
-
- LOG_EM("Duplicate 2N active assignments in '%s' and '%s'",
+ LOG_WA("Duplicate 2N active assignments exist in '%s' and '%s'",
a_susi_1->su->name.c_str(), a_susi_2->su->name.c_str());
- LOG_EM("Sending node reboot order to '%s'",
- a_susi_1->su->su_on_node->name.c_str());
- avd_d2n_reboot_snd(a_susi_1->su->su_on_node);
-
- if (a_susi_1->su->su_on_node != a_susi_2->su->su_on_node) {
- LOG_EM("Sending node reboot order to '%s'",
- a_susi_2->su->su_on_node->name.c_str());
- avd_d2n_reboot_snd(a_susi_2->su->su_on_node);
- }
} else if (s_susi_1->su != s_susi_2->su) {
// Duplicate 2N standby assignments found
- // Reboot both nodes hosting the SUs to recover
-
- LOG_EM("Duplicate 2N standby assignments in '%s' and '%s'",
+ LOG_WA("Duplicate 2N standby assignments exist in '%s' and '%s'",
s_susi_1->su->name.c_str(), s_susi_2->su->name.c_str());
-
- LOG_EM("Sending node reboot order to '%s'",
- s_susi_1->su->su_on_node->name.c_str());
- avd_d2n_reboot_snd(s_susi_1->su->su_on_node);
-
- if (s_susi_1->su->su_on_node != s_susi_2->su->su_on_node) {
- LOG_EM("Sending node reboot order to '%s'",
- s_susi_2->su->su_on_node->name.c_str());
- avd_d2n_reboot_snd(s_susi_2->su->su_on_node);
- }
}
}
a_susi = a_susi_1;
--
2.7.4
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel