|
From: <pra...@or...> - 2014-08-06 09:36:42
|
osaf/services/saf/amf/amfd/sgproc.cc | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
saAmfSINumCurrActiveAssignments and saAmfSINumCurrStandbyAssignment are the
two attributes of SI which together decides saAmfSIAssignmentState of SI.
When these two runtime attributes exactly matches their configuration based
counterparts, saAmfSIPrefActiveAssignments and saAmfSINumCurrStandbyAssignments,
a SI is said to be in FULLY_ASSIGNED state. Mismatch of runtime attributes with
the configuered ones leads to PARTIALLY assigned state of SI. Also if run time
attributes are 0 then saAmfSIAssignmentState will be SA_AMF_ASSIGNMENT_UNASSIGNED.
In the present problem AMF increments saAmfSINumCurrActiveAssignments when
it sends modify active assignment to a SU for an SI. This active assignment
failed with nodefailover escalation. AMF removes the SUSI for the sent assignment
without compensating for the increased count. This mismatch with the configured
values shows SI in PARTIALLY_ASSIGNED state after node joins the cluster.
This patch ensures that saAmfSINumCurrActiveAssignments or
saAmfSINumCurrStandbyAssignment are set properly in SIs during
nodefailover.
diff --git a/osaf/services/saf/amf/amfd/sgproc.cc b/osaf/services/saf/amf/amfd/sgproc.cc
--- a/osaf/services/saf/amf/amfd/sgproc.cc
+++ b/osaf/services/saf/amf/amfd/sgproc.cc
@@ -1634,6 +1634,26 @@ void avd_node_down_appl_susi_failover(AV
avd_susi_update_assignment_counters(susi, AVSV_SUSI_ACT_MOD,
SA_AMF_HA_QUIESCING, SA_AMF_HA_QUIESCED);
}
+ else if ((susi->fsm == AVD_SU_SI_STATE_MODIFY) &&
+ (susi->state == SA_AMF_HA_ACTIVE)) {
+ /* SUSI is undergoing active modification. For active state
+ saAmfSINumCurrActiveAssignments was increased when active
+ assignment had been sent. So decrement the count in SI before
+ deleting the SUSI.
+ */
+ susi->si->dec_curr_act_ass();
+ }
+ else if ((susi->fsm == AVD_SU_SI_STATE_MODIFY) &&
+ (susi->state == SA_AMF_HA_STANDBY)) {
+ /* SUSI is undergoing standby modification. For standby state
+ saAmfSINumCurrStandbyAssignments was increased when standby
+ assignment had been sent. So decrement the count in SI before
+ deleting the SUSI.
+ */
+ susi->si->dec_curr_stdby_ass();
+ }
+
+
}
/* Now analyze the service group for the new HA state
|