Subject: RE: Timeout during COMMIT SET phase?

From: "Ayers, Mike" <[email-masked]>
Date: Thu, 19 Jul 2001 11:39:24 -0500

> > From:	[email-masked] [SMTP:[email-masked]]

> > As far as I know, the AgentX protocol does not define
> > behavior of the master/subagent when a timeout occurs
> > during the COMMIT phase of a SET request.

	Thought I'd snip the relevant sections.  It gets clearer when I
stick 'em together (at least it does for me).

From RFC2741:

<SNIP>
7.2.5.1.  Common Processing of All AgentX Response PDUs

   1) If a response is not received on a session within the timeout
      interval for this dispatch, it is treated as if the subagent had
      returned `genErr' and processed as described below.
</SNIP>

<SNIP>
7.2.5.5.  Processing of Responses to agentx-CommitSet-PDUs

   After common processing of the subagent's response to an agentx-
   CommitSet-PDU (see section 7.2.5.1, "Common Processing of All AgentX
   Response PDUs", above), processing continues with the following
   steps:

   1) If any response is not `noError', the SNMP response PDU's error
      code is set to this value.  If res.error contains an AgentX
      specific value (e.g. `parseError'), the SNMP response PDU's error
      code is set to a value of genErr instead.  Also, the SNMP response
      PDU's error index is set to the index of the VarBind corresponding
      to the failed VarBind in the agentx-TestSet-PDU.

      An agentx-UndoSet-PDU is sent to each target session that has been
      sent an agentx-CommitSet-PDU.  An agentx-CleanupSet-PDU is sent to
      the remainder of the involved sessions.
</SNIP>

<SNIP>
7.2.5.6.  Processing of Responses to agentx-UndoSet-PDUs

   After common processing of the subagent's response to an agentx-
   UndoSet-PDU (see section 7.2.5.1, "Common Processing of All AgentX
   Response PDUs", above), processing continues with the following
   steps:

   1) If any response is `undoFailed' the SNMP response PDU's error code
      is set to this value.  Also, the SNMP response PDU's error index
      is set to 0.

   2) Otherwise, if any response is not `noError' the SNMP response
      PDU's error code is set to this value.  Also, the SNMP response
      PDU's error index is set to the index of the VarBind corresponding
      to the failed VarBind in the agentx-TestSet-PDU. If res.error is
      an AgentX specific value (e.g. `parseError'), the SNMP response
      PDU's error code is set to a value of genErr instead.

   3) Otherwise the SNMP response PDU's error code and error index were
      set in section 7.2.5.5 step 1)
</SNIP>

Return value:
	undoFailed - if returned, else
	(return code to undoSet that was not noError) - if returned, else
	genErr

Cleanupo PDUs:
	UndoSet - if a CommitSet had been sent, else
	CleanupSet

	HTH,

/|/|ike

---

From: [email-masked] (Frank Fock)
Date: Fri, 20 Jul 2001 09:29:45 +0200

Mike and Bert,

Thanks for your clarifications. It aligns with my first approach to this
problem. What made me uncertain about it was that the subagent
that timed out will receive the UNDO while the COMMIT is currently
in progress. Thus, a multithreaded agent must serialize the AgentX requests
related to a SNMP SET request.

Best regards,
Frank