Commit graph

1749 commits

Author SHA1 Message Date
spigell
b9766ae515 add mips to released ARCH (#2746) 2019-04-01 14:58:56 +01:00
Miek Gieben
a6cc88756c
proxy: remove from config (#2744)
fully remove proxy and make it completely external.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-04-01 07:52:47 +01:00
Miek Gieben
c21f0c9651
README: minimal changes to say we're a DNS server (#2743)
Small tweaks, tell we're a DNS server.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-04-01 07:52:37 +01:00
Xiao An
cb96ab9f4f Fully deprecate TIMEOUT and NO_RELOAD (#2742)
* Fully deprecate NO_RELOAD

Signed-off-by: Xiao An <hac@zju.edu.cn>

* Fully deprecate TIMEOUT

Signed-off-by: Xiao An <hac@zju.edu.cn>

* Update CI tests to adapt to the deprecation of TIMEOUT

Signed-off-by: Xiao An <hac@zju.edu.cn>

* Add documents for directive transfer in plugin auto

Signed-off-by: Xiao An <hac@zju.edu.cn>
2019-04-01 07:28:01 +01:00
Miek Gieben
99c3d065bc plugin/chaos: add default list of authors (#2737)
* plugin/chaos: add default list of authors

Add a owners_generate.go that generates a Owners variables for use in
the chaos plugin.

Add a default list of authors in the authors.bind CH zone. When doing a
query this now returns:

~~~ sh
% dig authors.bind TXT CH

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5456
;; flags: qr rd; QUERY: 1, ANSWER: 22, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;authors.bind.			CH	TXT

;; ANSWER SECTION:
authors.bind.		0	CH	TXT	"bradbeam"
authors.bind.		0	CH	TXT	"chrisohaver"
authors.bind.		0	CH	TXT	"dilyevsky"
authors.bind.		0	CH	TXT	"ekleiner"
authors.bind.		0	CH	TXT	"fastest963"
authors.bind.		0	CH	TXT	"fturib"
authors.bind.		0	CH	TXT	"greenpau"
authors.bind.		0	CH	TXT	"grobie"
authors.bind.		0	CH	TXT	"inigohu"
authors.bind.		0	CH	TXT	"isolus"
authors.bind.		0	CH	TXT	"johnbelamaric"
authors.bind.		0	CH	TXT	"miekg"
authors.bind.		0	CH	TXT	"nchrisdk"
authors.bind.		0	CH	TXT	"nitisht"
authors.bind.		0	CH	TXT	"pmoroney"
authors.bind.		0	CH	TXT	"rajansandeep"
authors.bind.		0	CH	TXT	"rdrozhdzh"
authors.bind.		0	CH	TXT	"rtreffer"
authors.bind.		0	CH	TXT	"stp-ip"
authors.bind.		0	CH	TXT	"superq"
authors.bind.		0	CH	TXT	"varyoo"
authors.bind.		0	CH	TXT	"yongtang"
~~~

This was hard to do previously as we didn't hardcode this in the source,
but now with OWNERS files we can just generate this list.

Privacy wise this isn't worse than being listed in OWNERS file in the
first place. And it's a nice hat tip to the people making CoreDNS
better.

Signed-off-by: Miek Gieben <miek@miek.nl>

* Sticklet bot comments

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-31 11:01:11 -07:00
dilyevsky
1e150674c5 [plugin/route53]: Do not return NXDOMAIN where it should be NODATA. (#2734)
* [plugin/route53]: Do not return NXDOMAIN where it should be NODATA.

Signed-off-by: Dmitry Ilyevskiy <dmitry.ilyevskiy@getcruise.com>

* Fix bad merge.

Signed-off-by: Dmitry Ilyevskiy <dmitry.ilyevskiy@getcruise.com>
2019-03-31 10:12:33 -07:00
Miek Gieben
db34c10589
server: small cleanups (#2740)
Rename connTimeout to graceTimeout to be more instructive on it's use,
some whitespace for imports lines.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-31 08:32:55 +01:00
Miek Gieben
c5bad4f81d
Doc: regenerate the man-pages (#2739)
A 'make -f Makefile.doc clean all'.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-30 13:56:52 +00:00
Miek Gieben
b75478e73b
server: remove if registry != nil code (#2735)
I can't find what's this code should be doing and it looks like it's
not doing anything.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-30 11:50:19 +00:00
Miek Gieben
ba87a0e6ba
plugin/cancel: add context cancelation plugin (#2711)
* plugin/cancel: add context cancelation plugin

Per review comments on #2704, move this into a plugin that gets called.
Add the most minimal plugin, tests and documenation.

Signed-off-by: Miek Gieben <miek@miek.nl>

* plugin/cache: add timeout option

review feedback: add option to set custom timeout.

Signed-off-by: Miek Gieben <miek@miek.nl>

* spelling

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-29 19:40:23 +00:00
Miek Gieben
fcb49fe016
plugin/pprof: spice up the readme (#2731)
Rework this a little to be more inline with the other READMEs

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-29 12:47:59 +00:00
Francois Tur
c144da2524 plugin/pprof - add option to enable block profiling (#2729)
* - add an option for block profiling to plugin pprof

* - move option block into nested block
2019-03-29 06:37:17 +00:00
Chris O'Haver
f6eb2a4c14 restore change detection (#2696) 2019-03-26 15:26:19 +00:00
Miek Gieben
53f3f0b666
Remove context.Context from request.Request (#2726)
* Remove context.Context from request.Request

This removes the context from request.Request and makes all the changes
in the code to make it compile again. It's all mechanical. It did
unearth some weirdness in that the context was kept in handler structs
which may cause havoc with concurrently handling of requests.

Fixes #2721

Signed-off-by: Miek Gieben <miek@miek.nl>

* Make test compile

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-26 14:37:30 +00:00
Miek Gieben
6492f777cd
pkg/response: add extra test for impossible msg (#2727)
Add another test case for impossible DNS messages which should not be
cached. This adds a check for a message that denies its own existence.

Fixes #2724.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-26 14:36:20 +00:00
Miek Gieben
93f635023a
Don't double report metrics on error (#2719)
* Don't double report metrics on error

When there is an error use a different function to report the metrics,
in case the plugin chain handled the request the metrics are already
reported.

Fixes: #2717

Signed-off-by: Miek Gieben <miek@miek.nl>

* Compile again

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-25 19:04:03 +00:00
Miek Gieben
9a8c301a42 Remove server addr from the context (#2722)
* more

Signed-off-by: Miek Gieben <miek@miek.nl>

* Remove server addr from the context

This was added twice, just leave the server which also holds the
address.

Conflicts with #2719 but should be easy to fix.

Signed-off-by: Miek Gieben <miek@miek.nl>

* doesn't need server context

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-25 10:46:44 -07:00
Miek Gieben
45624a0c0a plugin/log: remove ErrorFunc (#2716)
The server handles this case no need to also do it in the log plugin.

Means DefaultErrorFunc can be private to the dnsserver and is now
renamed to just errorFunc

Fixes: #2715

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-25 11:36:46 +08:00
Miek Gieben
f08f7e24d6
request.Request: remove useless function (#2714)
ErrorMessage was a very shallow function that didn't add anything.
Remove it and remove its usage.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-24 13:26:15 +00:00
Miek Gieben
1e281ad8f0
grpc: go generate (#2712)
*grpc* was added manually; do a go generate to add it, so we don't have
future diffs.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-23 18:17:07 +00:00
peiranliushop
403d42ce20 Support logging to dnstap in forward plugin (#2703) 2019-03-23 09:45:20 +00:00
Jiacheng Xu
0e137b23f1 plugin/metrics: Add a metric to monitor which plugin(s) is(are) enabled (#2700)
* Add a GaugeVec for enabled plugins monitoring.

Signed-off-by: Jiacheng Xu <xjcmaxwellcjx@gmail.com>

* Add server label and zone label for enable_plugin matric.

* Add a test for PluginEnabled metric

* Add description for enabledPlugin metric.

* Change the description for the enabledPlugin metric.

* Reset the enabledPlugin metric when restart the server.

* Add the bug session for enabledPlugin metric.

* Remove the resolveTCPAddr
2019-03-23 09:43:15 +00:00
Matt Greenfield
a3dd8cdf8d Add namespace_labels configuration for kubernetes plugin (#2707) 2019-03-22 14:32:40 +00:00
Miek Gieben
43c3e0ab68 plugin/kubernetes: add ready function (#2709)
* plugin/kubernetes: add ready function

Add ready function as the health function is now gone.

Signed-off-by: Miek Gieben <miek@miek.nl>

* Fix readme

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-20 09:32:23 -04:00
Aleks
aa9c7a2e61 Fix brackets (#2705)
Just fixing some missing `)`
2019-03-18 09:45:36 -07:00
MengZeLee
4405661520 patch setup (#2675)
* patch setup

Use a more streamlined grammar

* fix break

No need to break out in this for loop
2019-03-18 07:17:46 +00:00
Iñigo
287e280106 plugin/grpc: bugfix setup parser (#2697)
Fix setup parser. Config params are not being setting.
2019-03-15 07:55:26 +00:00
Iñigo
7b6cb76237 plugin/grpc: New gRPC plugin (#2667)
* plugin/grpc: New gRPC plugin

* some changes after the first review:

- remove healthcheck. gRPC already has this implicitly implemented
- some naming and stetic changes
- fix some comments
- other minor fixes

* plugin/grpc: New gRPC plugin

* some changes after the first review:

- remove healthcheck. gRPC already has this implicitly implemented
- some naming and stetic changes
- fix some comments
- other minor fixes

* add OWNERS file and change plugin order

* remove Rcode checker
2019-03-14 07:12:28 +00:00
dilyevsky
0d8e1cf8b4 [plugin/route53] Support wildcards and other escaped chars. (#2352)
* [plugin/route53] Support wildcards and other escaped chars.

* Fix multiple issues. Add tests.

* Cleanup some comments.
2019-03-13 18:46:30 +00:00
Stefan Budeanu
f798d18bdd Fix context passing (#2681) 2019-03-13 18:08:33 +00:00
Yong Tang
26e4026ec1 Add GO111MODULE=off for go get manifest-tool (#2691)
to fix issue #2689

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-03-13 18:07:54 +00:00
Rajveer Malviya
6a07e6dcd1 modules: run go mod tidy (#2687) 2019-03-13 08:02:59 +00:00
Miek Gieben
5cff7d5790
Remove etcd unit testing from travis (#2672)
* Remove etcd unit testing from travis

Remove these from the travis unit testing. (to speed up travis)

See #2671

Signed-off-by: Miek Gieben <miek@miek.nl>

* Add build tag

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-13 07:33:38 +00:00
Yong Tang
e9ed70cfbe Add $GOPATH/pkg/mod to Travis CI cache (#2686)
in order to speed up the go mod

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-03-13 07:33:10 +00:00
Miek Gieben
d652f72fa7
plugin/metadata: tweak the docs a little (#2685)
Add a simpler example that returns a static string the for metadata.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-13 07:26:29 +00:00
Miek Gieben
d69f97be5c
plugin/proxy: remove (#2683)
Point proxy to the fake deprecated plugin, next release that will be
removed as well.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-12 21:36:43 +00:00
David
e45411fdbd modules: cleanup modules support, fix DataDog/dd-trace-go problem (#2680)
cleanup modules support, fix DataDog/dd-trace-go probem, add go.mod tidyness check.
2019-03-12 12:36:13 -04:00
Miek Gieben
b602f3ed06
Remove pkg/healthcheck (#2678)
This now lives on coredns/proxy

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-12 12:51:34 +00:00
Miek Gieben
2ffcef1071
Take 3: to get coredns/proxy pulled in (#2677)
* Take 3: to get coredns/proxy pulled in

This is need temporary because it will point to the fake 'deprecated'
plugin anyway.

Signed-off-by: Miek Gieben <miek@miek.nl>

* update proxy again

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-12 11:31:46 +00:00
Miek Gieben
91d6451684
plugin/trace: update datadog import (#2676)
Use gopkg.in/DataDog/dd-trace-go.v0 as this is the new home for it

Fixes: #2282

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-12 11:01:47 +00:00
Yong Tang
162c3dd95d Remove proxy from kubernetes file (#2668)
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-03-11 19:47:29 +00:00
Miek Gieben
b67e4c47c2 Move to miekg/dns 1.1.6 (#2666)
Some more udp/tcp fixes/cleanups have been merged. Run through our gamut
of tests.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-11 09:17:27 -07:00
Miek Gieben
f7d34991c1 miekg/dns to version 1.1.5 (#2662)
This version reverts the worker model that's causes cpu overloads.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-09 10:13:38 -08:00
Miek Gieben
c778b3a67c
plugin/health: remove ability to poll other plugins (#2547)
* plugin/health: remove ability to poll other plugins

This mechanism defeats the purpose any plugin (mostly) caching can still
be alive, we can probably forward queries still. Don't poll plugins,
just tell the world we're up and running.

It was only actually used in kubernetes; and there specifically would
mean any network hiccup would NACK the entire server health.

Fixes: #2534

Signed-off-by: Miek Gieben <miek@miek.nl>

* update docs based on feedback

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-07 22:13:47 +00:00
Miek Gieben
db0b16b615
Add *ready* plugin (#2616)
Add a ready plugin that allows plugin to signal when they are ready.
Once a plugin is ready it is not queried again.

This uses same mechanism as the health plugin: each plugin needs to
implement an interface.

Implement readines for the *erratic* plugin to aid in testing.

Add README.md and tests moduled after the health plugin; which will be
relegated to just providing process health. In similar vein to health
this is a process wide setting.

With this Corefile:
~~~
. {
    erratic
    whoami
    ready
}

bla {
    erratic
    whoami
}
~~~

ready will lead to:

~~~ sh
% curl localhost:8181/ready
% dig @localhost -p 1053 mx example.org
% curl localhost:8181/ready
OK%
~~~

Meanwhile CoreDNS logs:

~~~
.:1053
bla.:1053
2019-02-26T20:59:07.137Z [INFO] CoreDNS-1.3.1
2019-02-26T20:59:07.137Z [INFO] linux/amd64, go1.11.4,
CoreDNS-1.3.1
linux/amd64, go1.11.4,
2019-02-26T20:59:11.415Z [INFO] plugin/ready: Still waiting on: "erratic"
2019-02-26T20:59:13.510Z [INFO] plugin/ready: Still waiting on: "erratic"
~~~

*ready* can be used in multiple server blocks and will do the right
thing; query all those plugins from all server blocks for readiness.
This does a similar thing to the prometheus plugin.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-07 20:35:16 +00:00
Miek Gieben
2b7e84a076
Remove internal loop detection (#2647)
* Remove internal loop detection

I can't actually think of a situation where we can create an internal
loop. Sure externally triggered cycles can happen, but this is where the
*loop* plugin comes in that detects those.

Fixes #2602

Signed-off-by: Miek Gieben <miek@miek.nl>

* Remove test

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-03-07 20:23:00 +00:00
Ruslan Drozhdzh
18d305f4b3 plugin/errors: remove cLogger and eLogger (#2657) 2019-03-07 20:14:09 +00:00
Xiao An
89a4b9bd45 Add deprecation notice for NO_RELOAD (#2643)
Signed-off-by: Xiao An <hac@zju.edu.cn>
2019-03-07 20:12:54 +00:00
Francois Tur
97e2a53a65 - remove caddy event, It is now triggered directly by Caddy in the Start function of the Instance (#2656) 2019-03-07 20:05:19 +00:00
Yong Tang
9dd288943a Move *proxy* to external (#2651)
* Move *proxy* to external

move the proxy plugin into coredns/proxy and remove it as a default
plugin. Link the proxy to deprecated in plugin.cfg

coredns/proxy doesn't compile because of the vendoring :(

Signed-off-by: Miek Gieben <miek@miek.nl>

* Add github.com/coredns/proxy

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-03-04 07:32:38 +00:00