Re: Reloading config with -HUP and update_config does not work

This is a discussion on Re: Reloading config with -HUP and update_config does not work within the SNMP Coders forums, part of the Networking and Network Related category; On Fri, 16 Nov 2007 01:15:22 +0100 Magnus wrote: MF> On tor, 2007-11-15 at 08:...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-03-2008
Robert Story
 
Posts: n/a
Default Re: Reloading config with -HUP and update_config does not work

On Fri, 16 Nov 2007 01:15:22 +0100 Magnus wrote:
MF> On tor, 2007-11-15 at 08:23 +0000, Colin Wernham wrote:
MF> > I have a problem with re-loading the snmpd.conf config using
MF> > update_config() function as it appears to not do any reloading of
MF> > config.
MF>
MF> It does reload the config. If you were to try again with the flag
MF> -Dsnmpd_ports you would see it change the port specification.
MF>
MF> > If I change the agentaddress config to a different port and then call
MF> > update_config(), the old port remains open and the new one is not
MF> > opened (as viewed by netstat -uan).
MF>
MF> This is also, sadly, true.
MF> The problem is that sockets are opened from the function
MF> init_master_agent and that is only called once from main.

Probably wouldn't be too hard to change that to some callback based system.
(SNMP_CALLBACK_POST_READ_CONFIG).

MF> A port is added => open the port.
MF> What should happen if opening the port fails?

Depends on how intelligent we want to get. At the very least, a message should
be logged. If there are no other ports open, exiting would be a reasonable
response. Possibly after a few retries.

MF> A port is removed => close the port.
MF> How should clients be notified? Should clients be notified?

Closing the port should be sufficient notification.

MF> Then there are some hard ones.
MF>
MF> The interface set of a port is expanded or shrunk (e.g. change from
MF> *:161 to localhost:161)
MF> Here connections on the interfaces that are left after the session
MF> creation MUST NOT get closed.

I wouldn't have a problem with simply closing all connections. Intelligent
clients will reconnect.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:48 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0