Hi Praveen, In the trace, for example, in SC-1, we can see the code was performed like:
Nov 14 11:02:27.743481 osafamfd [486:sg.cc:1693] >> set_fsm_state ... Nov 14 11:02:27.744077 osafamfd [486:sg.cc:1716] TR Admin operation finishes on SI:'safSi=SC-2N,safApp=OpenSAF' *Nov 14 11:02:27.744090 osafamfd [486:imm.cc:1971] >> avd_saImmOiAdminOperationResult: inv:17179869185, res:1** **Nov 14 11:02:27.744106 osafamfd [486:imm.cc:1976] << avd_saImmOiAdminOperationResult * Nov 14 11:02:27.744119 osafamfd [486:sg.cc:1724] << set_fsm_state The traces map to the code: > for (const auto& si : list_of_si) { > if (si->invocation != 0) { > TRACE("Admin operation finishes on > SI:'%s'",si->name.c_str()); > avd_saImmOiAdminOperationResult(avd_cb->immOiHandle, > si->invocation, SA_AIS_OK); > * si->invocation = 0;* > } > } So, the invocation here is reset. Best regards, Long Nguyen. On 11/17/2016 4:15 PM, praveen malviya wrote: > Hi Long, > > As per ticket, issue occurred during si-swap. > Please update the ticket with brief analysis so that seeing the ticket > one can have idea where the problem occurred. > I guess si-swap initiated before AMFD could update to IMM. > If that is the case, we should reject the admin operation from > si_admin_op_cb() if invocationId is still set in Si. > > Thanks, > Praveen > > On 16-Nov-16 4:19 PM, Long HB Nguyen wrote: >> osaf/services/saf/amf/amfd/imm.cc | 22 ++++++++++++++++++++++ >> osaf/services/saf/amf/amfd/include/imm.h | 2 ++ >> osaf/services/saf/amf/amfd/role.cc | 5 +++++ >> 3 files changed, 29 insertions(+), 0 deletions(-) >> >> >> 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 >> @@ -423,6 +423,28 @@ AvdJobDequeueResultT Fifo::execute(const >> return ret; >> } >> >> +AvdJobDequeueResultT Fifo::executeAdminResp(const AVD_CL_CB *cb) >> +{ >> + Job *ajob; >> + AvdJobDequeueResultT ret = JOB_EXECUTED; >> + >> + TRACE_ENTER(); >> + >> + while ((ajob = peek()) != nullptr) { >> + if (dynamic_cast<ImmAdminResponse *>(ajob) != nullptr) { >> + ret = ajob->exec(cb); >> + } else { >> + ajob = dequeue(); >> + delete ajob; >> + ret = JOB_EXECUTED; >> + } >> + } >> + >> + TRACE_LEAVE2("%d", ret); >> + >> + return ret; >> +} >> + >> // >> void Fifo::empty() >> { >> diff --git a/osaf/services/saf/amf/amfd/include/imm.h >> b/osaf/services/saf/amf/amfd/include/imm.h >> --- a/osaf/services/saf/amf/amfd/include/imm.h >> +++ b/osaf/services/saf/amf/amfd/include/imm.h >> @@ -146,6 +146,8 @@ public: >> >> static AvdJobDequeueResultT execute(const AVD_CL_CB *cb); >> >> + static AvdJobDequeueResultT executeAdminResp(const AVD_CL_CB >> *cb); >> + >> static void empty(); >> >> static uint32_t size(); >> diff --git a/osaf/services/saf/amf/amfd/role.cc >> b/osaf/services/saf/amf/amfd/role.cc >> --- a/osaf/services/saf/amf/amfd/role.cc >> +++ b/osaf/services/saf/amf/amfd/role.cc >> @@ -766,6 +766,11 @@ void avd_mds_qsd_role_evh(AVD_CL_CB *cb, >> } >> >> try_again: >> + /* Execute admin op jobs before calling saImmOiImplementerClear >> to avoid >> + * SA_AIS_ERR_TIMEOUT >> + */ >> + Fifo::executeAdminResp(cb); >> + >> /* Take mutex here to sync with imm reinit thread.*/ >> osaf_mutex_lock_ordie(&imm_reinit_mutex); >> /* Give up IMM OI implementer role */ >> > ------------------------------------------------------------------------------ _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel