[AGENT++] AgentX++ suagent commiterror let the RowStatus in detroy(6); the row is block forever!

Frank Fock fock at agentpp.com
Wed Nov 3 23:23:20 CET 2010


Hi Claus,

I have not (re)tested the NET-SNMP master agent within the last year.
The years before, the master agent had several bugs regarding
index allocation, context support, and region registration.

The if_mib.cpp implementation allocates its indexes using the
any_index() method. You will find comments that illustrate
the processing.

I am currently extending the agentppTestSharedTable example,
in order to support effective 2-phase-commit row operations
with a shared table.

That example will be part of AGENT++ 3.6 which is scheduled
for release in December 2010.

To simplify testing, maybe you should switch to the AgentX++
master?

If you need to allocate indexes (for example, because they
cannot be clustered by subagents by other means), you should
simply call AgentXSharedTable->allocate_index(..) instead
->add_row(..). Alternatively, ->any_index() or ->new_index().

If your shared tables have a RowStatus object, you will have
a problem as described in my previous email. If that is the
case, you should raise a JIRA support issue and attach the
MIB specifications of the shared tables and a description
why those tables need to be shared between subagents.
I can then put together a recommendation to solve the
problem.

Hope this helps.

Best regards,
Frank


On 03.11.2010 18:51, Claus Klein wrote:
> Hi Frank,
>
> I have a big problem with net-snmp as agents master.
>
> I had a look at the if_mib implementation.
> But I can not see, where the index is allocated, but this does not help
> anyway.
>
> For some tables I must use shared tables.
>
> The code is generated with AgentPro. What must I add or change to the
> generated code?
> I need a simple shared table with rowStatus which works?
>
> Can you send me an example.
> I have to find the net-snmp bug.
>
> Best regards,
> Claus
>
> On 03.11.2010, at 00:09, Frank Fock wrote:
>
>> Hi Claus,
>>
>> As the documentation of the AgentXSharedTable points out,
>> the allocate_index method has to be called manually
>> and it is NOT called by add_row.
>>
>> The question you probably want to ask is: "Why"?
>>
>> A shared table does not make sense, if you have a single
>> subagent only (as in your test).
>> If there are more than one agent, a row creation through
>> RowStatus mechanism, cannot work, because for the new
>> row, it is unclear which subagent should allocate/register
>> the row.
>>
>> That is the reason, why the allocate_index has not been
>> called automatically by add_row (it won't work in real-life
>> agents).
>>
>> Instead, the agentppTestSessionsTable exists that contains
>> a row for each subagent session. It provides the means needed
>> to be able to create a row in the associated shared table
>> on behalf of an user selected subagent.
>>
>> Consequently, the problem with the agentppTestSharedTable
>> implementation is that it allows the createAndWait and
>> createAndGo operations (without proper index allocation).
>>
>> It is not valid to deduce from that table implementation
>> on problems with other shared tables.
>>
>> I will fix the agentppTestSharedTable implementation
>> as indicated by the [APP-14] issue.
>>
>> Best regards,
>> Frank
>>
>

-- 
AGENT++
http://www.agentpp.com
http://www.snmp4j.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the AGENTPP mailing list