Hi -

Re note below, it seems like the first request after a load should not
fail, since the reload has completed and then the handler is called.  But
mine always fails, and then when I issue the command again, it works.
Based on my debug statements, it is failing on

switch (table_info->colnum) {
            case COLUMN_LLDPPORTCONFIGADMINSTATUS:
                if (!table_entry) {
DEBUGMSGTL(("lldpPortConfigTable", "handler3\n"));
                    netsnmp_set_request_error(reqinfo, request,
                                              SNMP_NOSUCHINSTANCE);
                    continue;

I thought maybe the new cache ptr was not set in time for the GET request,
so I put a 5 second delay in my handler code before the switch statement,
but it still fails that first time.  Is this the expected behavior?  I
don't see clients finding this too handy.

debug trace:

NET-SNMP version 5.4.2.1
lldpPortConfigTable: cache load
lldpPortConfigTable: cache for loop
lldpPortConfigTable: cache for loop0
lldpPortConfigTable: cache for loop bottom0
lldpPortConfigTable: cache for loop1
lldpPortConfigTable: cache for loop bottom1
lldpPortConfigTable: cache for loop2
lldpPortConfigTable: cache for loop bottom2
lldpPortConfigTable: cache for loop3
lldpPortConfigTable: cache for loop bottom3
lldpPortConfigTable: cache after loop4

// this is the failure path
lldpPortConfigTable: handler1
lldpPortConfigTable: handler2
lldpPortConfigTable: handler3

// this is the successful path
lldpPortConfigTable: handler1
lldpPortConfigTable: handler2
lldpPortConfigTable: handler43
lldpPortConfigTable: handler5

terminal output:
snmpget -v 2c -c private localhost LLDP-MIB::lldpPortConfigTable.1.2.2
LLDP-MIB::lldpPortConfigAdminStatus.2 = No Such Instance currently exists
at this OID

snmpget -v 2c -c private localhost LLDP-MIB::lldpPortConfigTable.1.2.2
LLDP-MIB::lldpPortConfigAdminStatus.2 = INTEGER: txAndRx(3)

My code is the same as what I sent earlier, other than some extra debug
statements.  Let me know if you need more info.  (I tried the timeout and
retry settings, but that does not seem to do anything for this type of
failure.)

Thanks.

Kathy McLeod

----- Forwarded by Kathy McLeod/Rochester/IBM on 04/28/2010 09:54 AM -----
                                                                           
             Kathy                                                         
             McLeod/Rochester/                                             
             i...@ibmus                                                  To 
                                       net-snmp-us...@lists.sourceforge.ne 
             04/23/2010 11:50          t                                   
             AM                                                         cc 
                                       dave.shi...@googlemail.com,         
                                       net-snmp-us...@lists.sourceforge.ne 
                                       t                                   
                                                                   Subject 
                                       Re: cache load never gets called    
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Hi -

I have some new info on this problem.  We upgraded to net-snmp 5.4.2.1 and
were seeing the same problem (cache reload never called after an unload).
I was always using the snmptable as the command (because my fake data show
different index values on a reload so easy to verify it worked).  However,
when I tried a snmpget the reload was called.  I was able to do 6 or more
unload/reloads, and did not have to do the cache check and reload in the
init routine (altho that worked as well).  So I was able to verify my code,
but this is still a bug (that the reload is not issued for other commands).

The -1 setting did not work for me.  After an unload, the next request
fails (because there is no table, I assume).  Then it reloads and maybe I
can issue one command and have it succeed.  Otherwise the next unload
clobbers my data.  Sometimes I get a segmentation error, or snmptable shows
part of the old table or part of the new table.  Is this how it is supposed
to work or am I missing something?  (This happens for other timeout values
as well, altho for testing I try to avoid issuing a command when the
timeout is about to happen.)

In another note, I asked about this:

Re this excerpt from the cache_handler documentation page:

xxx - method to prevent cache from expiring while a request is being
processed (e.g. delegated request). proposal: set a flag, which would be
cleared when request finished (which could be acomplished by a dummy data
list item in agent req info & custom free function).

Has this been implemented, or will it be in the near future?  Thanks.

It seems like without this, the cache-handling is not safe.

Thanks.

Kathy McLeod




             Dave Shield
             <d.t.shi...@liver
             pool.ac.uk>                                                To
             Sent by:                  Kathy McLeod/Rochester/i...@ibmus
             dave.shi...@googl                                          cc
             email.com                 net-snmp-us...@lists.sourceforge.ne
                                       t
                                                                   Subject
             04/13/2010 10:43          Re: cache load never gets called
             AM









On 13 April 2010 15:11, Kathy McLeod <kmcl...@us.ibm.com> wrote:
> I know I am not supposed to bug, but have you had a chance to look at
this?

No - I've been concentrating on build problems with the two releases
that we're trying to get out of the door.
   (Plus Real Paid Work that keeps getting in the way!).

I'm afraid that there's no chance of me finding the time to look at your
problem before I go on holiday at the end of the week.  Sorry.

Maybe someone else on the list might have some bright ideas.

Dave



------------------------------------------------------------------------------

_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


------------------------------------------------------------------------------
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to