From: bert hubert Date: Sat, 21 Nov 2015 21:07:32 +0000 (+0100) Subject: Merge branch 'master' of github.com:PowerDNS/pdns X-Git-Tag: dnsdist-1.0.0-alpha1~210^2~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a2aa00ed03085fac9fd6fc084b1f3b70cb5d1cc0;p=pdns Merge branch 'master' of github.com:PowerDNS/pdns Conflicts: pdns/dnsdist.hh --- a2aa00ed03085fac9fd6fc084b1f3b70cb5d1cc0 diff --cc pdns/dnsdist.cc index f7482cced,c60d9dd35..24141f9d6 --- a/pdns/dnsdist.cc +++ b/pdns/dnsdist.cc @@@ -1259,15 -1262,10 +1274,15 @@@ tr } } + if(g_dstates.getCopy().empty()) { + errlog("No downstream servers defined: all packets will get dropped"); + // you might define them later, but you need to know + } + for(auto& dss : g_dstates.getCopy()) { // it is a copy, but the internal shared_ptrs are the real deal if(dss->availability==DownstreamState::Availability::Auto) { - bool newState=upCheck(dss->remote); - warnlog("Marking downstream %s as '%s'", dss->getName(), newState ? "up" : "down"); + bool newState=upCheck(dss->remote, dss->checkName, dss->checkType, dss->mustResolve); + warnlog("Marking downstream %s as '%s'", dss->remote.toStringWithPort(), newState ? "up" : "down"); dss->upStatus = newState; } } diff --cc pdns/dnsdist.hh index bae1e8b9e,8ace38a00..f5d3ab780 --- a/pdns/dnsdist.hh +++ b/pdns/dnsdist.hh @@@ -47,8 -46,9 +47,10 @@@ struct DNSDistStat {"latency-avg10000", &latencyAvg10000}, {"latency-avg1000000", &latencyAvg1000000}, {"uptime", uptimeOfProcess}, {"real-memory-usage", getRealMemoryUsage}, - {"fd-usage", getOpenFileDescriptors}, - {"noncompliant-queries", &nonCompliantQueries} ++ {"noncompliant-queries", &nonCompliantQueries}, + {"cpu-user-msec", getCPUTimeUser}, + {"cpu-sys-msec", getCPUTimeSystem}, + {"fd-usage", getOpenFileDescriptors} }; };