Ack, code review only.
Thanks
Praveen
On 02-Aug-17 5:03 PM, minh chau wrote:
Hi Praveen,
This ticket as well as the *if* block we are talking about, it is for
absent SUSI which is read from IMM as a helper to failover after SG
absence stage. The current SG 2N code can not failover an absent SUSI to
another present SUSI that both have the same HA state, so we exclude
this case as in #2477, #2530.
The case you mention that has SU1, SU2, both of SUs have present SUSI,
and it won't run in the code of creating absent SUSI. It should be also
working as long as no loss of RTA, since after SC absence stage the SG
operation resumes to what it was before loss of SCs.
Thanks,
Minh
On 02/08/17 21:18, praveen malviya wrote:
Hi Minh,
I wanted to highlight a valid case when quiesced HA state can be there
in two SUs in 2N model. In switchover situation when one SU1 has
successfully quiesced, amfd sends active assignment to standby SU2.
While standby SU2 is becoming acitve it faults with comp-failover
recovery and AMFD sends it a quiesced HA state. Thus there can be two
quiesced valid SUSI in a SG at momentarily.
Thanks,
Praveen
On 02-Aug-17 4:41 PM, minh chau wrote:
Hi Praveen,
Please find my reply inline.
Thanks,
Minh
On 02/08/17 20:17, praveen malviya wrote:
Hi Minh,
Please find one query inline with [Praveen].
Thanks,
Praveen
On 28-Jul-17 7:44 AM, Minh Chau wrote:
Symtomp is similar to #2477, this patch fixes for case of
2 STANDBY assignment for same SI
---
src/amf/amfd/si.cc | 14 ++++++++++++++
src/amf/amfd/si.h | 1 +
src/amf/amfd/siass.cc | 6 ++----
3 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/src/amf/amfd/si.cc b/src/amf/amfd/si.cc
index 3f76c1476..27245339c 100644
--- a/src/amf/amfd/si.cc
+++ b/src/amf/amfd/si.cc
@@ -1594,6 +1594,20 @@ const AVD_SIRANKEDSU *AVD_SI::get_si_ranked_su(
return sirankedsu;
}
+/*
+ * @brief Count number of SUSI assignment that are assigned to
this SI
+ * with specified HA state
+ * @param [in] @ha: HA state
+ * @return: number of SUSI assignment
+ */
+uint32_t AVD_SI::count_sisu_with(SaAmfHAStateT ha) {
+ uint32_t count = 0;
+ for (AVD_SU_SI_REL *sisu = list_of_sisu; sisu != nullptr;
+ sisu = sisu->si_next) {
+ if (sisu->state == ha) count++;
+ }
+ return count;
+}
/*
* @brief Update alarm_sent by new value of @alarm_state,
diff --git a/src/amf/amfd/si.h b/src/amf/amfd/si.h
index 4f8dc5718..af14363b6 100644
--- a/src/amf/amfd/si.h
+++ b/src/amf/amfd/si.h
@@ -152,6 +152,7 @@ class AVD_SI {
const AVD_SIRANKEDSU *get_si_ranked_su(const std::string
&su_name) const;
bool is_active() const;
SaAisErrorT si_swap_validate();
+ uint32_t count_sisu_with(SaAmfHAStateT ha);
private:
bool is_assigned() const { return list_of_sisu ? true : false; }
diff --git a/src/amf/amfd/siass.cc b/src/amf/amfd/siass.cc
index d14d279dc..267c55c07 100644
--- a/src/amf/amfd/siass.cc
+++ b/src/amf/amfd/siass.cc
@@ -351,11 +351,9 @@ bool
avd_susi_validate_absent_assignment(AVD_SU *su, AVD_SI *si,
goto done;
}
// No need to create absent SUSI assignment for the 2N SI that
already has
- // ACTIVE SUSI
+ // the same @imm_ha_state SUSI
if (su->sg_of_su->sg_redundancy_model ==
SA_AMF_2N_REDUNDANCY_MODEL) {
- if (si->list_of_sisu != nullptr &&
- si->list_of_sisu->state == SA_AMF_HA_ACTIVE &&
- imm_ha_state == SA_AMF_HA_ACTIVE)
+ if (si->count_sisu_with(imm_ha_state) > 0)
[Praveen] Ticket is raised for 2 standby case and earliar fix was
for 2 acitve case. This if block now does not check HA state. What
will happen in the case of quiesced state? We can have two quiesced
state in case of faults when a SU faults when it is becoming active
in switchover situation and amf sends quiesced state to this faulted
active SU.
[Minh]: This *if* block now is for all HA states. It means that we
don't create an absent SUSI when amfd already had another SUSI with
same HA state in 2N SG. I should have made it this way earlier in
ticket #2477 so we would not have this ticket #2530.
goto done;
}
------------------------------------------------------------------------------
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