Menu

#897 Fix DisMan monitoring of AgentX subagent problem

closed
nobody
None
5
2012-11-08
2008-03-18
Fred Gao
No

I think the problem is due to internal queries using functions from snmp_client.c obstruct agent normal operation. During waiting for the reply of the internal queries, response from agentx subagent was not processed by the agent because "netsnmp_check_outstanding_agent_requests" was not called in the loop.
To fix it, I created internal_snmp_client.c by copying some code from snmp_client.c and add the above call to the internal queries. I also fixed a few minor problems in disman event mib that may crash agent.

Discussion

  • Fred Gao

    Fred Gao - 2008-03-18

    Logged In: YES
    user_id=2039733
    Originator: YES

    The patch was created on net-snmp 5.4.1. It was compiled and tested on linux.

     
  • Fred Gao

    Fred Gao - 2008-03-18

    Logged In: YES
    user_id=2039733
    Originator: YES

    File Added: net-snmp-disman.patch

     
  • Fred Gao

    Fred Gao - 2008-03-18
     
  • Wes Hardaker

    Wes Hardaker - 2008-03-21

    Logged In: YES
    user_id=76242
    Originator: NO

    I'm confused why a whole new set of code needed to be written with the internal query functions when they look like duplicates of the main library instead of reusing existing functions?

    Or did I miss something?

     
  • Wes Hardaker

    Wes Hardaker - 2008-03-21

    Logged In: YES
    user_id=76242
    Originator: NO

    I'm confused why a whole new set of code needed to be written with the internal query functions when they look like duplicates of the main library instead of reusing existing functions?

    Or did I miss something?

     
  • Nobody/Anonymous

    Logged In: NO

    They are not exactly the same. The new internal query functions call netsnmp_check_outstanding_agent_requests in the _snmp_synch_response_cb. This is the root problem of the bug. I think it's not appropriate to add the call of netsnmp_check_outstanding_agent_requests to the snmp_client.c.

     
  • Dave Shield

    Dave Shield - 2008-06-13

    Logged In: YES
    user_id=88893
    Originator: NO

    Thanks for the patch! It has been applied to the 5.3.x and 5.4.x code branches and the main development tree, and will appear in future releases of the Net-SNMP package.

     
  • Dave Shield

    Dave Shield - 2008-06-13

    Logged In: YES
    user_id=88893
    Originator: NO

    SVN revision 17031

    Note that the patch applied is functionally equivalent to your suggestion,
    but avoids the need to declare a parallel version of snmp_synch_response_cb
    (by including a suitable hook routine within the main library code).
    This reduces the scope of the necessary changes significantly, and
    means we won't need to maintain two copies of the same code in parallel.

     

Log in to post a comment.