osaf/services/saf/amf/amfd/sg_2n_fsm.cc | 14 +++++++-------
osaf/services/saf/amf/amfd/su.cc | 18 ++++++++++++++----
2 files changed, 21 insertions(+), 11 deletions(-)
Shutdown operation was rejected because shitdown operation
was going on. Amf should respect lock operation as per Specs.
Now, if lock is issued on su when shutdown is going on, then
Amf will send response for shutdown first and then start lock operation.
Once lock operation is completed, then Amf will respond to imm for
lock operation.
diff --git a/osaf/services/saf/amf/amfd/sg_2n_fsm.cc
b/osaf/services/saf/amf/amfd/sg_2n_fsm.cc
--- a/osaf/services/saf/amf/amfd/sg_2n_fsm.cc
+++ b/osaf/services/saf/amf/amfd/sg_2n_fsm.cc
@@ -3609,17 +3609,17 @@ uint32_t SG_2N::su_admin_down(AVD_CL_CB
/* If the SU is in the operation list and the SU admin
state is lock.
* send D2N-INFO_SU_SI_ASSIGN modify quiesced message
to the SU.
*/
- if (!avd_sidep_si_dependency_exists_within_su(su)) {
+ if (avd_sidep_si_dependency_exists_within_su(su)) {
+ if
(avd_sg_susi_mod_snd_honouring_si_dependency(su, SA_AMF_HA_QUIESCED) ==
+ NCSCC_RC_FAILURE) {
+ LOG_NO("%s:%u: %s (%u)", __FILE__,
__LINE__, su->name.value, su->name.length);
+ goto done;
+ }
+ } else {
/* change the state for all assignments to
quiesced. */
if (avd_sg_su_si_mod_snd(cb, su,
SA_AMF_HA_QUIESCED) == NCSCC_RC_FAILURE) {
LOG_NO("%s:%u: %s (%u)", __FILE__,
__LINE__, su->name.value, su->name.length);
goto done;
- } else {
- if
(avd_sg_susi_mod_snd_honouring_si_dependency(su, SA_AMF_HA_QUIESCED) ==
- NCSCC_RC_FAILURE) {
- LOG_NO("%s:%u: %s (%u)",
__FILE__, __LINE__, su->name.value, su->name.length);
- goto done;
- }
}
}
}
diff --git a/osaf/services/saf/amf/amfd/su.cc b/osaf/services/saf/amf/amfd/su.cc
--- a/osaf/services/saf/amf/amfd/su.cc
+++ b/osaf/services/saf/amf/amfd/su.cc
@@ -1119,7 +1119,8 @@ static void su_admin_op_cb(SaImmOiHandle
/* Avoid multiple admin operations on other SUs belonging to the same
SG. */
for (su_ptr = su->sg_of_su->list_of_su; su_ptr != NULL; su_ptr =
su_ptr->sg_list_su_next) {
- if (su_ptr->pend_cbk.invocation != 0) {
+ /* su's sg_fsm_state is checked below, just check other su. */
+ if ((su != su_ptr) && (su_ptr->pend_cbk.invocation != 0)) {
report_admin_op_error(immoi_handle, invocation,
SA_AIS_ERR_TRY_AGAIN, NULL,
"Admin operation is already going on
(su'%s')", su_ptr->name.value);
goto done;
@@ -1134,9 +1135,18 @@ static void su_admin_op_cb(SaImmOiHandle
}
if (su->sg_of_su->sg_fsm_state != AVD_SG_FSM_STABLE) {
- report_admin_op_error(immoi_handle, invocation,
SA_AIS_ERR_TRY_AGAIN, NULL,
- "SG state is not stable"); /* whatever that
means... */
- goto done;
+ if((su->sg_of_su->sg_fsm_state != AVD_SG_FSM_SU_OPER) ||
+ (su->saAmfSUAdminState !=
SA_AMF_ADMIN_SHUTTING_DOWN) ||
+ (op_id != SA_AMF_ADMIN_LOCK)) {
+ report_admin_op_error(immoi_handle, invocation,
SA_AIS_ERR_TRY_AGAIN, NULL,
+ "SG state is not stable"); /* whatever
that means... */
+ goto done;
+ } else {
+ /* This means that shutdown was going on and lock has
+ been issued. In this case, response to shutdown
+ and then allow lock operation to proceed. */
+ su->complete_admin_op(SA_AIS_OK);
+ }
}
/* if Tolerance timer is running for any SI's withing this SG, then
return SA_AIS_ERR_TRY_AGAIN */
if (sg_is_tolerance_timer_running_for_any_si(su->sg_of_su)) {
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel