osaf/services/saf/amf/amfd/sg_nway_fsm.cc |  13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)


In the given configuration, swapped SI2 was fully assigned in the beginning
but it had only one standby assignment. When SI-SWAP operation was performed
on the SI, it caused removal of quiesced state after standby took the active
role.

In N-Way model a SI will have multiple standby assignments, so even if swap 
leads
to removal of one standby there would be other standby SUs to take over the 
active role.
So, I think, a general check for checking saAmfSGMaxStandbySIsperSU count for
highest ranked SU is not needed and operation should be allowed if there are
more than two standbys SUs exist for the SI and it will lead to removal of
assignment after swap. A check can be added in a case where SI got reduced
(by configuration or due to degraded state of the system) to 2N type of 
redundancy
and operation will leave SI with only active state by removing the quiesced 
state.

Patch rejects si-swap if there is only one standby assignment for SI and
si-swap will lead to removal of quiesced assignment becuase of
saAmfSGMaxStandbySIsperSU constraint.

diff --git a/osaf/services/saf/amf/amfd/sg_nway_fsm.cc 
b/osaf/services/saf/amf/amfd/sg_nway_fsm.cc
--- a/osaf/services/saf/amf/amfd/sg_nway_fsm.cc
+++ b/osaf/services/saf/amf/amfd/sg_nway_fsm.cc
@@ -3589,6 +3589,19 @@ SaAisErrorT SG_NWAY::si_swap(AVD_SI *si,
                rc = SA_AIS_ERR_BAD_OPERATION;
                goto done;
        }
+       /*
+          Reject si-swap if there is only one standby assignment for SI and 
+          si-swap will lead to removal of quiesced assignment becuase of 
+          saAmfSGMaxStandbySIsperSU constraint.
+        */
+       if ((si->curr_standby_assignments() == 1) &&
+               (si->sg_of_si->saAmfSGMaxStandbySIsperSU < 
+                
static_cast<SaUint32T>(actv_susi->su->hastate_assignments_count(SA_AMF_HA_STANDBY)+1)))
 {
+               LOG_NO("%s SWAP not allowed as it will leave SI without standby 
assignment.",
+                               si->name.value);
+               rc = SA_AIS_ERR_BAD_OPERATION;
+               goto done;
+       }
        if ((avd_sg_nway_siswitch_func(avd_cb, si)) == NCSCC_RC_FAILURE) {
                rc = SA_AIS_ERR_BAD_OPERATION;
                goto done;

------------------------------------------------------------------------------
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to