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: Dynamic discovery and upgrade of backends #11293

Merged
merged 23 commits into from
Feb 22, 2022

Conversation

rgacogne
Copy link
Member

@rgacogne rgacogne commented Feb 4, 2022

Short description

Implement https://datatracker.ietf.org/doc/html/draft-ietf-add-ddr-04 to automatically discover if we can upgrade Do53 backends to DoT or DoH.

Needs regression tests.

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

@rgacogne rgacogne added this to the dnsdist-1.8.0 milestone Feb 4, 2022
@rgacogne rgacogne marked this pull request as ready for review February 8, 2022 09:38
@rgacogne rgacogne force-pushed the ddist-backend-discovery-rebased branch from eafaefa to 2d1e9a0 Compare February 10, 2022 14:53
@omoerbeek omoerbeek mentioned this pull request Feb 11, 2022
7 tasks
@rgacogne rgacogne force-pushed the ddist-backend-discovery-rebased branch from 14c9720 to 3416fb5 Compare February 11, 2022 11:30
@omoerbeek
Copy link
Member

I'm seeing compile warnings on OpenBSD (clang-13)

In file included from dnsdist-idstate.cc:2:
./dnsdist.hh:696:3: warning: explicitly defaulted move constructor is implicitly deleted [-Wdefaulted-function-deleted]
  DownstreamState(DownstreamState&&) = default;
  ^
./dnsdist.hh:766:10: note: move constructor of 'DownstreamState' is implicitly deleted because field 'sendErrors' has a deleted move constructor
  stat_t sendErrors{0};
         ^
./stat_t.hh:43:5: note: 'stat_t_trait' has been explicitly marked deleted here
    stat_t_trait(const stat_t_trait&) = delete;
    ^
In file included from dnsdist-idstate.cc:2:
./dnsdist.hh:698:20: warning: explicitly defaulted move assignment operator is implicitly deleted [-Wdefaulted-function-deleted]
  DownstreamState& operator=(DownstreamState&&) = default;
                   ^
./dnsdist.hh:795:48: note: move assignment operator of 'DownstreamState' is implicitly deleted because field 'hashes' has a deleted move assignment operator
  SharedLockGuarded<std::vector<unsigned int>> hashes;
                                               ^
./lock.hh:450:21: note: copy assignment operator of 'SharedLockGuarded<std::vector<unsigned int>>' is implicitly deleted because field 'd_mutex' has a deleted copy assignment operator
  std::shared_mutex d_mutex;
                    ^
/usr/include/c++/v1/shared_mutex:188:19: note: 'operator=' has been explicitly marked deleted here
    shared_mutex& operator=(const shared_mutex&) = delete;

@rgacogne
Copy link
Member Author

I'm seeing compile warnings on OpenBSD (clang-13)

In file included from dnsdist-idstate.cc:2:
./dnsdist.hh:696:3: warning: explicitly defaulted move constructor is implicitly deleted [-Wdefaulted-function-deleted]
  DownstreamState(DownstreamState&&) = default;
  ^
./dnsdist.hh:766:10: note: move constructor of 'DownstreamState' is implicitly deleted because field 'sendErrors' has a deleted move constructor
  stat_t sendErrors{0};
         ^
./stat_t.hh:43:5: note: 'stat_t_trait' has been explicitly marked deleted here
    stat_t_trait(const stat_t_trait&) = delete;
    ^
In file included from dnsdist-idstate.cc:2:
./dnsdist.hh:698:20: warning: explicitly defaulted move assignment operator is implicitly deleted [-Wdefaulted-function-deleted]
  DownstreamState& operator=(DownstreamState&&) = default;
                   ^
./dnsdist.hh:795:48: note: move assignment operator of 'DownstreamState' is implicitly deleted because field 'hashes' has a deleted move assignment operator
  SharedLockGuarded<std::vector<unsigned int>> hashes;
                                               ^
./lock.hh:450:21: note: copy assignment operator of 'SharedLockGuarded<std::vector<unsigned int>>' is implicitly deleted because field 'd_mutex' has a deleted copy assignment operator
  std::shared_mutex d_mutex;
                    ^
/usr/include/c++/v1/shared_mutex:188:19: note: 'operator=' has been explicitly marked deleted here
    shared_mutex& operator=(const shared_mutex&) = delete;

We do not actually use these so I deleted them.

@rgacogne rgacogne force-pushed the ddist-backend-discovery-rebased branch from e139b05 to 580c0e0 Compare February 22, 2022 09:05
@rgacogne
Copy link
Member Author

Rebased to fix several conflicts with #11163.

Copy link
Member

@Habbie Habbie left a comment

Choose a reason for hiding this comment

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

Awesome work! Tests and docs look good. Code also looks good (but I did not read every line - a lot appeared to be "mechanical" changes like the new config object). I tested DoT auto-upgrade with quad9 and that works perfectly.

pdns/dnsdist-console.cc Outdated Show resolved Hide resolved
@rgacogne rgacogne force-pushed the ddist-backend-discovery-rebased branch from 580c0e0 to 29f4e3c Compare February 22, 2022 12:34
@rgacogne rgacogne merged commit a4b3cd2 into PowerDNS:master Feb 22, 2022
@rgacogne rgacogne deleted the ddist-backend-discovery-rebased branch February 22, 2022 18:09
rgacogne added a commit to rgacogne/pdns that referenced this pull request Feb 23, 2022
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.

4 participants