osaf/services/saf/amf/amfd/imm.cc | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
It has been found that an admin operation (other than controller switch-over)
can be started after a controller switch-over has been initiated.
The result of this can be that the admin operation response gets lost.
The reason for it to get lost is that an IMM admin response has to be
responded on the same node where it was initiated.
The change is to disallow new admin operations when controller
switch-over is in progress. This will result in TRYAGAIN to the issuing program
which should stop once the AMF implementer has connected and the controller
switch-over has finished.
credit: Hans Feldt
diff --git a/osaf/services/saf/amf/amfd/imm.cc
b/osaf/services/saf/amf/amfd/imm.cc
--- a/osaf/services/saf/amf/amfd/imm.cc
+++ b/osaf/services/saf/amf/amfd/imm.cc
@@ -650,6 +650,14 @@ static void admin_operation_cb(SaImmOiHa
AVSV_AMF_CLASS_ID type = object_name_to_class_type(object_name);
TRACE_ENTER2("'%s', invocation: %llu, op: %llu", object_name->value,
invocation, op_id);
+
+ /* ignore admin ops if we are in the middle of a role switch */
+ if (avd_cb->swap_switch == SA_TRUE) {
+ TRACE("Admin op received during a role switch");
+ avd_saImmOiAdminOperationResult(immoi_handle, invocation,
SA_AIS_ERR_TRY_AGAIN);
+ goto done;
+ }
+
saflog(LOG_NOTICE, amfSvcUsrName, "Admin op \"%s\" initiated for '%s',
invocation: %llu",
admin_op_name(static_cast<SaAmfAdminOperationIdT>(op_id)),
object_name->value, invocation);
@@ -659,6 +667,8 @@ static void admin_operation_cb(SaImmOiHa
LOG_ER("Admin operation not supported for %s (%u)",
object_name->value, type);
avd_saImmOiAdminOperationResult(immoi_handle, invocation,
SA_AIS_ERR_INVALID_PARAM);
}
+
+done:
TRACE_LEAVE();
}
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel