Hi Neel and Hans, A return of ERR_TIMEOUT *always* means the invoker does *not* know if the operation was executed or not. It should in general never be *explicitly* returned by an OI, unless the cause was that the OI was itself getting ERR_TIMEOUT on a sub operation...
Invoking the same op again after ERR_TIMEOUT is only guaranteed to work for operations that are idempotent. So Smf can not in general try again as described here when getting TIMEOUT, unless Smf knows something is special about this operation such as that it is idempotent. /AndersBj -----Original Message----- From: Nagendra Kumar [mailto:[email protected]] Sent: den 4 september 2014 08:44 To: Hans Feldt; Hans Nordebäck; Praveen Malviya Cc: [email protected] Subject: Re: [devel] [PATCH 1 of 1] amfd: respond to shutdown op if lock has been issued before it completes [#1021] Hi Hans, I think it is better to return OK because of following reasons: 1. It avoids Smf upgrade failures. If Amf returns TIME_OUT, Smf tries again(not sure about the implementation, but as per Spec, it should try again) and Smf may get TRY_AGAIN or BAD_OP error return code. If Smf get BAD_OP, it will abort upgrade. 2. If Smf accepts OK in this case and then run another command like unlock, then worst case, it will get TRY_AGAIN and this is one of above case. Thanks -Nagu > -----Original Message----- > From: Hans Feldt [mailto:[email protected]] > Sent: 03 September 2014 17:54 > To: Hans Feldt; Nagendra Kumar; Hans Nordebäck; Praveen Malviya > Cc: [email protected] > Subject: RE: [devel] [PATCH 1 of 1] amfd: respond to shutdown op if > lock has been issued before it completes [#1021] > > Or from 9.4.6: > > SA_AIS_ERR_BAD_OPERATION - The operation was not successful because > the target entity is locked or locked for instantiation. > > > -----Original Message----- > > From: Hans Feldt [mailto:[email protected]] > > Sent: den 3 september 2014 14:15 > > To: [email protected]; Hans Nordebäck; > > [email protected] > > Cc: [email protected] > > Subject: Re: [devel] [PATCH 1 of 1] amfd: respond to shutdown op if > > lock has been issued before it completes [#1021] > > > > Do we think OK is an appropriate error code here? > > Maybe TIMEOUT? > > /Hans > > > > > -----Original Message----- > > > From: [email protected] [mailto:[email protected]] > > > Sent: den 3 september 2014 13:45 > > > To: Hans Feldt; Hans Nordebäck; [email protected] > > > Cc: [email protected] > > > Subject: [PATCH 1 of 1] amfd: respond to shutdown op if lock has > > > been issued before it completes [#1021] > > > > > > osaf/services/saf/amf/amfd/si.cc | 4 ++++ > > > 1 files changed, 4 insertions(+), 0 deletions(-) > > > > > > > > > If shutdown op is undergoing, lock can be issued. > > > If lock is isued, Amf is not responding to shutdown op. > > > Amf should ideally respond to shutdown op immediately after it > > > receives lock op. And after lock op completes, then Amf should > > > respond to lock op. > > > > > > diff --git a/osaf/services/saf/amf/amfd/si.cc > > > b/osaf/services/saf/amf/amfd/si.cc > > > --- a/osaf/services/saf/amf/amfd/si.cc > > > +++ b/osaf/services/saf/amf/amfd/si.cc > > > @@ -881,6 +881,10 @@ static void si_admin_op_cb(SaImmOiHandle > > > report_admin_op_error(immOiHandle, > invocation, SA_AIS_ERR_TRY_AGAIN, NULL, > > > "'%s' other semantics...", > objectName->value); > > > goto done; > > > + } else { > > > + rc = SA_AIS_OK; > > > + > avd_saImmOiAdminOperationResult(immOiHandle, si->invocation, rc); > > > + si->invocation = 0; > > > } > > > } > > > > > > > -------------------------------------------------------------------- > > -- > > -------- > > Slashdot TV. > > Video for Nerds. Stuff that matters. > > http://tv.slashdot.org/ > > _______________________________________________ > > Opensaf-devel mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/opensaf-devel ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ Opensaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ Opensaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel
