Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 570794

Summary: net-dns/pdns: init.d restart broken
Product: Gentoo Linux Reporter: Adrian <adrian>
Component: Current packagesAssignee: Sven Wegener <swegener>
Status: RESOLVED FIXED    
Severity: normal CC: adrian, bertrand, gentoo, whissi
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Adrian 2016-01-03 22:37:36 UTC
pdns_control quit does not wait for the server to terminate. This results in `start` failing because the old one is still running.

Jan  3 23:29:27 hydra pdns[9831]: Scheduling exit on remote request
Jan  3 23:29:27 hydra pdns[9893]: Previous controlsocket '/var/run/pdns.controlsocket' is in use
Jan  3 23:29:27 hydra pdns[9831]: Guardian is killed, taking down children with us

Afterwards, I can only start it again after zapping it.

A `sleep 1` at the end of the stop() command solved this for me, but manually editing the init script is not very clean IMO... restart() cannot  be overridden but maybe there's a better workaround than slowing down all stops even if there's not restart (OTOH, waiting for the server to terminate when stopping sounds like a good thing)
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2017-01-18 18:31:43 UTC
I can confirm the problem.

In the past I created a new runscript for pdns, see https://github.com/Whissi/gentoo-overlay/blob/master/net-dns/pdns/files/pdns.initd
Comment 2 Sven Wegener gentoo-dev 2017-05-06 19:34:54 UTC
I've updated the ebuild to 4.0.3-r2 which uses an updated init script, that employs a timeout on stop and fails the stop command if the daemon doesn't stop properly.