Few comments:
1. report_admin_op_error could be used instead of
avd_saImmOiAdminOperationResult stating appropriate reason.
2. The below code should be removed now from avd_sg_2n_siswap_func:
if (susi->si->sg_of_si->sg_ncs_spec) {
if (true == avd_cb->swap_switch ) {
LOG_NO("SI Swap not possible, Controller role switch
under progress");
rc = SA_AIS_ERR_TRY_AGAIN;
goto done;
}
}
Thanks
-Nagu
> -----Original Message-----
> From: Gary Lee [mailto:[email protected]]
> Sent: 22 April 2014 09:36
> To: [email protected]; Nagendra Kumar; Praveen Malviya;
> [email protected]
> Cc: [email protected]
> Subject: [PATCH 1 of 1] amfd: Respond with TRY_AGAIN to admin ops during a
> controller switch-over [#821]
>
> 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