Add systemd notify support to auth and recursor #3764

Merged
merged 5 commits into from May 10, 2016

Projects

None yet

3 participants

@pieterlexis
Member

No description provided.

@pieterlexis
Member

@rubenk, @rgacogne comments very welcome.

@rgacogne rgacogne commented on an outdated diff Apr 29, 2016
pdns/pdns_recursor.cc
@@ -2651,6 +2655,9 @@ int serviceMain(int argc, char*argv[])
if(g_numThreads == 1) {
L<<Logger::Warning<<"Operating unthreaded"<<endl;
recursorThread(0);
+#ifdef HAVE_SYSTEMD
+ sd_notify(0, "READY=1");
@rgacogne
rgacogne Apr 29, 2016 Member

Shouldn't the call be before calling recursorThread()?

@rgacogne
Member

except for the previous comment, LGTM

@pieterlexis
Member

The problem is we still can exit with a config error (webserver) in recursorThread, although.. But when you're running unthreaded you're (hopefully) not doing production.

@pieterlexis pieterlexis modified the milestone: auth-4-alpha3 May 9, 2016
@rgacogne
Member

Not sure if relevant, but it might be a good idea to prevent the services files from being installed on trusty, as done in #3837 ?

@pieterlexis
Member

I was planning to fix that after #3837 was merged

@Habbie Habbie merged commit 0720f40 into PowerDNS:master May 10, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@pieterlexis pieterlexis deleted the pieterlexis:systemd-notify branch May 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment