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: add option to showRules actions to truncate rule length output #6402

Merged
merged 2 commits into from Mar 27, 2018

Conversation

chbruyand
Copy link
Member

Short description

This fix #5763 while not changing the default output behaviour.

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)

Copy link
Member

@rgacogne rgacogne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, a couple nits

@@ -408,15 +408,15 @@ const std::vector<ConsoleKeyword> g_consoleKeywords{
{ "show", true, "string", "outputs `string`" },
{ "showACL", true, "", "show our ACL set" },
{ "showBinds", true, "", "show listening addresses (frontends)" },
{ "showCacheHitResponseRules", true, "[showUUIDs]", "show all defined cache hit response rules, optionally with their UUIDs" },
{ "showCacheHitResponseRules", true, "[{showUUIDs=false, truncateRuleWidth=-1}]", "show all defined cache hit response rules, optionally with their UUID sand optionally truncated to a given width" },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/UUID sand/UUIDs and/

@@ -915,24 +915,39 @@ void parseRuleParams(boost::optional<luaruleparams_t> params, boost::uuids::uuid
uuid = makeRuleID(uuidStr);
}

typedef std::unordered_map<std::string, boost::variant<bool, int, std::string, std::vector<std::pair<int,int> > > > localbind_t;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

localbind_t is not a really good name and we already use it in another unit, perhaps ruleparams_t or something like that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

@pieterlexis pieterlexis merged commit fa4a352 into PowerDNS:master Mar 27, 2018
@chbruyand chbruyand deleted the dnsdist-issue-5763 branch March 27, 2018 12:38
@rgacogne rgacogne mentioned this pull request Mar 29, 2018
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dnsdist: show a subset of the rule if the rule is huge
3 participants