Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 510760 - net-dialup/freeradius-2.2.5 - /etc/init.d/radiusd fails to restart radiusd after upgrade from 2.2.0 because PID file location changed
Summary: net-dialup/freeradius-2.2.5 - /etc/init.d/radiusd fails to restart radiusd af...
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Gentoo Dialup Developers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-19 14:38 UTC by Mark
Modified: 2014-05-20 08:53 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark 2014-05-19 14:38:15 UTC
When starting radiusd for the first time either after a reboot or once started manually, it will not restart citing errors relating to a service already running on port 1812.

Reproducible: Always

Steps to Reproduce:
1. Start system
2. Run '/etc/init.d/radiusd stop'
3. Try running '/etc/init.d/radiusd stop' or 'radiusd -X' to see errors
4. Run 'ps -eaf | grep radius' to see that the process is still running
5. Run 'kill ' and then the process id from step 4
6. Run '/etc/init.d/radiusd start' or 'radiusd -X' and it should be fine again, but will not work after being stopped.
7. Check '/var/lib/run' for the existance of 'radiusd' directory as well as the pid files.



Turns out that following an upgrade from 2.2.0 to 2.2.5 that the location for 'localstatedir' in radiusd.conf has been changed to '/var/lib' meaning that the init scripts were not killing the process since it was in '/var/lib/run/radiusd'.  After modifying this line to read 'localstatedir = /var' everything happens as it should on a restart, running 'radiusd -X' and using the init scripts to control the service.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-05-19 15:54:18 UTC
2.2.0 used /var/lib/run/radiusd and 2.2.5 fixed that so /run/ is used instead. I would have thought configuration file protection would have warned you that radiusd.conf had changed.
Comment 2 Mark 2014-05-19 16:00:34 UTC
(In reply to Jeroen Roovers from comment #1)
> 2.2.0 used /var/lib/run/radiusd and 2.2.5 fixed that so /run/ is used
> instead. I would have thought configuration file protection would have
> warned you that radiusd.conf had changed.

It may well have done and I'm willing to admit that I may have missed this at the beginning of the differences shown, although I did pick up on some other minor changes that I had to make.  I thought I'd report it since I wasn't sure if the intention was for the config to point at '/var/lib' anyway, as the init scripts were not working as they should for shutting down.
Comment 3 Mark 2014-05-19 16:34:54 UTC
(In reply to Mark from comment #2)
> (In reply to Jeroen Roovers from comment #1)
> > 2.2.0 used /var/lib/run/radiusd and 2.2.5 fixed that so /run/ is used
> > instead. I would have thought configuration file protection would have
> > warned you that radiusd.conf had changed.
> 
> It may well have done and I'm willing to admit that I may have missed this
> at the beginning of the differences shown, although I did pick up on some
> other minor changes that I had to make.  I thought I'd report it since I
> wasn't sure if the intention was for the config to point at '/var/lib'
> anyway, as the init scripts were not working as they should for shutting
> down.

Also, when I ran etc-update, I replaced radiusd.conf with the new one and then modified the 2 lines that I needed to, rather than making the changes to the old file.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2014-05-19 18:44:40 UTC
I have reviewed all the init script changes and I didn't find any problems there that could be fixed in the scripts themselves. The PID files are now written to the location OpenRC expects them, and the change was both likely to cause this (temporary) breakage and necessary.

There isn't much we can do about run time variables like PID file locations that normally rarely change. OpenRC could probably be taught to use the old init.d script to stop a service and then use the new init.d script to (re)start it.
Comment 5 Mark 2014-05-20 08:15:14 UTC
OK, thanks for investigating.