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

dnsdist: Report Lua(Response)Action failures #6283

Merged
merged 2 commits into from Feb 20, 2018

Conversation

@zeha
Copy link
Collaborator

@zeha zeha commented Feb 19, 2018

Short description

Previously, an error from inside Lua code in an LuaAction or LuaResponseAction would cause the query to not be answered at all, with no diagnostics.

  • Creates a new statistic item: rule-servfail
  • Logs Lua errors with warnlog
  • Failed Lua code causes an immediate ServFail now

Example log:

> LuaAction failed inside lua, returning ServFail: [string "chunk"]:21: attempt to call a nil value (global 'rl')

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled and tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)
@zeha zeha added this to the dnsdist-1.3.0 milestone Feb 19, 2018
case DNSResponseAction::Action::ServFail:
dr.dh->rcode = RCode::ServFail;
return true;
break;

This comment has been minimized.

@rgacogne

rgacogne Feb 20, 2018
Member

I wonder if we should increment g_stats.ruleServFail here too?

This comment has been minimized.

@zeha

zeha Feb 20, 2018
Author Collaborator

We don't increment any of the ruleXXX counters for ResponseActions right now, and I think that would be confusing because the sums will not match up.

This comment has been minimized.

@rgacogne

rgacogne Feb 20, 2018
Member

Alright, that makes sense :)

@rgacogne rgacogne merged commit 426b6d8 into PowerDNS:master Feb 20, 2018
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@zeha zeha deleted the zeha:dnsdist-luaaction-error branch Feb 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.