Hi Praveen, I agreee, ack from me, code review only/Thanks HansN
On 10/29/2015 05:17 AM, praveen malviya wrote: > > > On 29-Oct-15 4:22 AM, Hans Nordebäck wrote: >> Hi Praveen, >> >> trying to understand the problem below, if N-way and >> saAmfSGMaxStandbySIsperSU = 1, >> and say there are 2 SUs and 2 SIs with the following assignments: >> SU1 SU2 >> Active Standby Standby Active >> ^ ^ ^ ^ >> | | | | >> SI1 SI2 SI1 SI2 >> >> wouldn't si-swap of any si would lead to paritally assigned due to >> saAmfSGMaxStandbySIsperSU = 1? >> If so amf is performing according to spec, and to correct this, >> saAmfSGMaxStandbySIsperSU has to be increased? > > > In the above example if si-swap is performed on any SI then it will > lead to removal of quiesced state for the SI. From spec perspective, > it is fine. But this SI is now without standby assignment (without > redundancy) and any fault can lead to complete service outage. > In this way rejection of operation is forcing the user to > reconfigure/modify saAmfSGMaxStandbySIsperSU. > > If multiple standby are present for an SI, then si-swap will not be > rejected as there are standbys to take the active role. > > Thanks > Praveen >> >> /Thanks HansN >> >> On 10/13/2015 11:29 AM, [email protected] wrote: >>> 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
