RE: Sending trap from source code

"Mike Ayers" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <83E753BE7B6A324ABB336245BAF1DAAC0852650A@mailserver.metatv-ds.metatv.com>
> From: [email protected] 
> [mailto:[email protected]] On 
> Behalf Of [email protected]
> Sent: Monday, April 14, 2008 9:35 PM

> 	  The system is something like whenever the subagent sees a
> change on a watched variable it triggers synchronization between
> available data with it and its respective configuration file (this is
> for persistent storage of available data in subagent).
> 
> This is achieved by sending snmp SET requests to the master agent with
> data available in the configuration file.
> 
> During the process of synchronization I only want to handle requests
> from the simulated manager(as described above) and not from any other
> manager until the entire configuration file is read.

	The brutal way to do it is to simply drop incoming requests into the bitbucket while performing the update.  This is valid SNMP, and if there are relatively few updates which take a relatively long time to synchronize (>30sec), I would recommend it.  You may also wish to respond with a resourceUnavailable error code, which maps to genErr for v1, IIRC.

	For brief outage intervals (<<15sec), I would suggest a mutex that causes the write request to wait until the subagent has completed processing.

	My recommendations don't cover all the possible situations, but it does boil down to that choice:  either ignore/reject the request, or define the pend to be part of the request processing.  Either way, be very clear to the userbase about the behavior, and they should be able to adapt quite nicely to it.


	HTH,

Mike

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.