I've checked in some code to git that allows HUP to reload virtual server configurations. For now, all it does is reload the authorize, authenticate, accounting, pre-proxy, etc. sections. It does NOT reload listen sections, client sections, or anything else. However, it now allows you to update the policies in the virtual server configuration on the fly. If there is an error loading one of the virtual servers, then the NEW configuration for that virtual server is ignored, and the server keeps using the OLD (i.e. working) configuration. While there hasn't been a large demand for this feature, it's one step along the way to a complete reload on HUP, which *has* been requested. Alan DeKok.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Alan DeKok wrote:
I've checked in some code to git that allows HUP to reload virtual server configurations. For now, all it does is reload the authorize, authenticate, accounting, pre-proxy, etc. sections. It does NOT reload listen sections, client sections, or anything else.
However, it now allows you to update the policies in the virtual server configuration on the fly.
If there is an error loading one of the virtual servers, then the NEW configuration for that virtual server is ignored, and the server keeps using the OLD (i.e. working) configuration.
While there hasn't been a large demand for this feature, it's one step along the way to a complete reload on HUP, which *has* been requested.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html Interesting indeed. I can see a use for this. How do you initiate the HUP ? Via the radmin tool ?
Arran -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAknw6H0ACgkQcaklux5oVKL9rACgj7K3GEMF5loW2/RQ5YTgBfHJ C5oAn3eP2uh8ABcGcwejizdAXKW23Zss =Hwvs -----END PGP SIGNATURE-----
Arran Cudbard-Bell wrote:
Interesting indeed. I can see a use for this. How do you initiate the HUP ? Via the radmin tool ?
HUP is a Unix signal, originally meaning "Hang Up" but since has been co-opted to mean "reload your configuration" when the signal is sent to a service (e.g. a daemon). Note, reload is significantly different than restart, during a reload the service continues to run whereas a restart the existing process is terminated and restarted. Unix signal are sent to a process via the kill() function or the kill command (historically signals were often used to kill a process, hence the name, however a better name might be send_signal(), but history lives on). So to send a HUP to radiusd you need to know the process id (pid) of the radiusd service, let's say it's 1234: % kill -HUP 1234 -or- % kill -HUP `pidof radiusd ` Most SysV init scripts support the reload command, the init script knows the pid of the service and whether it's running, thus the preferred way to send a HUP reload is: % service radiusd reload Of course radmin and the other control features should accept triggering a reload and I'm sure Alan has added this, but it probably won't be via a HUP signal, I expect the control socket will receive a reload command which calls the same function the signal handler invokes when it receives a HUP signal (actually the reload won't occur in the signal handler, rather the signal handler will set a flag). -- John Dennis <jdennis@redhat.com> Looking to carve out IT costs? www.redhat.com/carveoutcosts/
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi John,
Interesting indeed. I can see a use for this. How do you initiate the HUP ? Via the radmin tool ?
I know what HUP is :) But thank you for expounding on the history. I was just wondering if there was a way to reload specific virtual server configuration files via the radmin tool, instead of reloading *every* virtual server with a -HUP. I should have been clearer. When some people say 'HUP' they're referring to HUP like behaviour, not actually sending a process the HUP signal.
HUP is a Unix signal, originally meaning "Hang Up" but since has been co-opted to mean "reload your configuration" when the signal is sent to a service (e.g. a daemon). Note, reload is significantly different than restart, during a reload the service continues to run whereas a restart the existing process is terminated and restarted. Unix signal are sent to a process via the kill() function or the kill command (historically signals were often used to kill a process, hence the name, however a better name might be send_signal(), but history lives on).
Thanks, Arran -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAknw9sQACgkQcaklux5oVKLBTACffcErbGJ2oGQb2zmOUGW/0l1c jLoAoI0yQzIL6DDgUBlCzZWk/pfey02P =ikoe -----END PGP SIGNATURE-----
Arran Cudbard-Bell wrote:
Interesting indeed. I can see a use for this. How do you initiate the HUP ? Via the radmin tool ?
$ kill -HUP pid or $ radmin radmin> hup :) There's currently no way of reloading just *one* virtual server. The reason is that they are all loaded into one big configuration file via the $INCLUDE. Alan DeKok.
participants (3)
-
Alan DeKok -
Arran Cudbard-Bell -
John Dennis