Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 570794 - net-dns/pdns: init.d restart broken
Summary: net-dns/pdns: init.d restart broken
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sven Wegener
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-03 22:37 UTC by Adrian
Modified: 2017-05-06 19:34 UTC (History)
4 users (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 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.