Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

newServer setting maxCheckFailures makes no sense #4198

merged 2 commits into from Aug 1, 2016


Copy link

@stutiredboy stutiredboy commented Jul 18, 2016

when dnsdist add newServer with maxCheckFailures parameter, such as maxCheckFailures=3, if the downstream server seems to be down, then the dss->currentCheckFailures will increase 1.

but, if dss->currentCheckFailures not reach the maxCheckFailures value, at this time, the downstream server seems to be up, the dss->currentCheckFailures was not reset to 0.

so when dss->currentCheckFailures reach maxCheckFailures, dnsdist will show downstream down, the change to up in the next second.

dnsdist[24734]: Marking downstream as 'down'
dnsdist[24734]: Marking downstream as 'up'

In my opinion, discontinuous failure retry makes no sense, so I post this pull request.


Copy link

@rgacogne rgacogne commented Jul 18, 2016


This change makes sense, thank you! Could you just fix the indentation? I know it's not easy as we still have a mix of tabs and spaces in some places.

@@ -1254,7 +1254,12 @@ void* healthChecksThread()
for(auto& dss : g_dstates.getCopy()) { // this points to the actual shared_ptrs!
if(dss->availability==DownstreamState::Availability::Auto) {
bool newState=upCheck(*dss);
if (!newState && dss->upStatus) {
if (newState) {
if (dss->currentCheckFailures != 0) {

This comment has been minimized.


rgacogne Jul 18, 2016

You could perhaps skip that test, but that doesn't matter much.

Copy link
Contributor Author

@stutiredboy stutiredboy commented Jul 19, 2016

rager that. I use space as the indent.

Copy link

@rgacogne rgacogne commented Jul 29, 2016


@rgacogne rgacogne merged commit 3075d37 into PowerDNS:master Aug 1, 2016
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants