Commit graph

1250 commits

Author SHA1 Message Date
Chris O'Haver
f4cb9a1ba3
fix readme (#3889)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-05-14 09:58:58 -07:00
Miek Gieben
7aaed71b92
Fix query for SOA record for delegated zone (#3875)
Addresses a bug in the file plugin where SOA queries to zone delegations are
inappropriately returned the SOA for the delegating zone, and not a downward
referral to the delegated zone.

Here is an example of what I believe the expected downward referral in response
to a SOA query for a delegated zone should be (note that no SOA record is
returned):

~~~
; <<>> DiG 9.11.3-1ubuntu1.5-Ubuntu <<>> @k.root-servers.net. miek.nl. SOA
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58381
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 3, ADDITIONAL: 7
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;miek.nl.                       IN      SOA

;; AUTHORITY SECTION:
nl.                     172800  IN      NS      ns1.dns.nl.
nl.                     172800  IN      NS      ns2.dns.nl.
nl.                     172800  IN      NS      ns3.dns.nl.

;; ADDITIONAL SECTION:
ns1.dns.nl.             172800  IN      A       194.0.28.53
ns2.dns.nl.             172800  IN      A       194.146.106.42
ns3.dns.nl.             172800  IN      A       194.0.25.24
ns1.dns.nl.             172800  IN      AAAA    2001:678:2c:0:194:0:28:53
ns2.dns.nl.             172800  IN      AAAA    2001:67c:1010:10::53
ns3.dns.nl.             172800  IN      AAAA    2001:678:20::24
~~~

See #3852 for the original fix.

Modified clouddns/route53 and removed the faulty tests there.

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-05-11 07:51:02 -07:00
Catena cyber
886cdd9dd3
Fix plugin forward fuzz target (#3877)
using new method to start proxies

Signed-off-by: Philippe Antoine <contact@catenacyber.fr>
2020-05-07 10:24:00 +02:00
Chris O'Haver
5897a7c03d
plugin/kubernetes: Mention remote IP requirement for autopath and metadata in README (#3876)
* mention remote IP requirement for autopath and metadata

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* remove whitespace

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-05-06 09:07:14 -07:00
Chris O'Haver
7c7772b735
always add client metadata (#3874)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-05-05 11:34:24 -07:00
Eli Lindsey
9f9509b6c0
fix description of bufsize plugin (#3873)
Signed-off-by: Eli Lindsey <eli@siliconsprawl.com>
2020-05-04 07:02:58 -07:00
Chris O'Haver
a5e286ac4e
plugin/kubernetes: Don't panic with metadata enabled and pods mode not verified (#3869)
* prevent panic in podWithIP

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* add unit test, correct existing unit test

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* unit tests make more sense this way

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-05-04 10:17:26 +02:00
Krzysztof Dąbrowski
5347bc38e7
Fix CIDR in example (#3864)
Signed-off-by: Krzysztof Dąbrowski <krzysdabro@live.com>
2020-04-28 10:46:20 -04:00
Erfan Besharat
dcdbec53e4
Fix NSID not being set on cached responses (#3822)
* Add NSID to the cached responses

Signed-off-by: Erfan Besharat <erbesharat@gmail.com>

* Add test for NSID being set on cached responses

Signed-off-by: Erfan Besharat <erbesharat@gmail.com>
2020-04-27 08:49:56 -07:00
Miek Gieben
840e875665
Run go generate (#3856)
@zouyee has added himself to CODEOWNERS, run go generate to update
the author list for the chaos plugin.

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-04-27 10:38:44 +02:00
Chris O'Haver
74eabe90e0
not implemented yet (#3851)
Automatically submitted.
2020-04-24 05:50:29 +00:00
Yong Tang
180a6709a8
Fix readme test by removing extra ~ (#3850)
This PR removing extra `~` as it was causing test failure:
```
--- FAIL: TestReadme (0.05s)
476    readme_test.go:81: Failed to start server with ../plugin/dns64/README.md, for input "Corefile:6 - Error during parsing: Unknown directive 'Or'":
477        . {
478            dns64 64:1337::/96
479        }
480        ~~~~
481
482        Or
483        . {
484            dns64 {
485                prefix 64:1337::/96
486            }
487        }
488FAIL
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2020-04-23 21:03:15 -04:00
Miek Gieben
ec5696b202
plugin/dns64: update readme and owners (#3848)
* plugin/dns64: update readme and owners

Make @superq code owner of the plugins. Update the readme a bit:

* don't make it start with a quote
* make it look more like other README's in syntax description
* make a full corefile examples and tests these by setting the corefile
  language tag

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

* Update plugin/dns64/README.md

Co-Authored-By: Ben Kochie <superq@gmail.com>

* Update plugin/dns64/README.md

Co-Authored-By: Ben Kochie <superq@gmail.com>

* Update plugin/dns64/README.md

Co-Authored-By: Ben Kochie <superq@gmail.com>

* Update plugin/dns64/README.md

Co-Authored-By: Ben Kochie <superq@gmail.com>

* Update plugin/dns64/README.md

Co-Authored-By: Ben Kochie <superq@gmail.com>

Co-authored-by: Ben Kochie <superq@gmail.com>
2020-04-23 10:22:20 +02:00
Mirek S
8fe950f4bc
Fix to: (#3840)
https://github.com/coredns/coredns/issues/3810

Signed-off-by: msedzins <msedzins@gmail.com>
Signed-off-by: msedzins <macbookpro@mbp-macbookpro-2.home>

Co-authored-by: msedzins <macbookpro@mbp-macbookpro-2.home>
2020-04-22 14:55:07 +02:00
Tobias Schmidt
8013925b53
Remove grobie from maintainers (#3833)
I haven't been maintaining production DNS setups in quite a while and
don't have the time to review CoreDNS pull requests. Hereby I resign
from all positions in the CoreDNS project.

CoreDNS is a great project and SoundCloud still processes hundreds of
thousands of requests per second with the help of CoreDNS. Thanks a lot
for your hard work and all the best for the future.

Signed-off-by: Tobias Schmidt <tobidt@gmail.com>
2020-04-15 10:07:10 +02:00
Zou Nengren
c639615615
remove ignored option at kubernetes plugin (#3737)
Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
2020-04-14 09:03:18 -04:00
kadern0
e410760a49
plugin/forward: crash if using https (#3817)
Signed-off-by: kadern0 <kaderno@gmail.com>
2020-04-09 11:26:28 -07:00
Zou Nengren
4ccd55e95e
correct metrics name of cache size (#3805)
Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
2020-04-03 09:30:06 -07:00
Ben Kochie
a29a594e5c
Update more metrics names (#3799)
The subsystem of a metric must be it's plugin name. "dns" is reserved
for the core. Use a const convention to avoid copy-paste mistakes in
naming.

Fix dns64 and acl plugin.

Signed-off-by: Ben Kochie <superq@gmail.com>
2020-03-31 20:03:18 +02:00
Zou Nengren
87214a4c5c
introduce metric naming test (#3789)
* introduce metric naming test

Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>

* Update metrics.go

Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
2020-03-31 08:07:36 +02:00
Yong Tang
ebbfffaf9d
Update k8s.io/[api|apimachinery|client-go] to v0.18.0 (#3796)
* Update k8s.io/[api|apimachinery|client-go] to v0.18.0

This PR updates k8s.io/[api|apimachinery|client-go] to v0.18.0

This PR closes 3791
This PR closes 3792
This PR closes 3793

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Fix test failures

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Fix failed tests

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Fix test failure

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2020-03-30 11:10:41 -07:00
Zou Nengren
8bbfa19223
remove federation (#3794)
Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
2020-03-30 09:08:20 -07:00
Zou Nengren
fa1e909d0b
regitry reload metrics (#3784)
Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
2020-03-27 09:40:59 +01:00
Chris O'Haver
5cd8472384
Fix plugin name in project README (#3683)
* Update README.md

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* fix readme occurances

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-03-26 10:24:56 -04:00
Ben Kochie
14ca454981
Documentation improvements for dns64 plugin (#3777)
Minor typo and improvements to the dns64 plugin README.

Signed-off-by: Ben Kochie <superq@gmail.com>
2020-03-26 09:22:29 +01:00
Miek Gieben
19cfa2960c
Cleanup metrics (#3776)
Cleanup a variety of metric issues.
* Eliminate department of redundancy "count_total" naming.
* Use the plural of the unit when appropriate. (ex, "requests")
* Remove label names from metric names where appropriate. (ex, "rcode")
* Simplify request metrics by consolidating type label in to the base
request counter.
* Re-generate man pages.

Signed-off-by: Ben Kochie <superq@gmail.com>

Co-authored-by: Ben Kochie <superq@gmail.com>
2020-03-26 09:17:33 +01:00
Chris O'Haver
eb23cce1a7
add known issue (#3770)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-03-26 08:42:32 +01:00
Ben Kochie
4eeaef29ea
Add dns64 plugin (#3534)
* Add dns64 plugin

Add external plugin to core in-tree.
* Pull code from upstream: https://github.com/serverwentdown/dns64
* Update docs.

Signed-off-by: Ben Kochie <superq@gmail.com>

* Make dns64 consistent.

Signed-off-by: Ben Kochie <superq@gmail.com>

* Cleanup README

Signed-off-by: Ben Kochie <superq@gmail.com>

* Cleanup minor issues.

Signed-off-by: Ben Kochie <superq@gmail.com>

* Remove proxy method.

Signed-off-by: Ben Kochie <superq@gmail.com>

* dns64: big cleanup

* Make the code a bit more idiomatic
* Add tests
* use proper Upstream API

Signed-off-by: Casey Callendrello <c1@caseyc.net>
Signed-off-by: Ben Kochie <superq@gmail.com>

* A little more clenaup

* Fix some docs.
* Use the correct plugin register method.
* Cleanup some review items.

Signed-off-by: Ben Kochie <superq@gmail.com>

* Add metrics counter for DNS64 translations

Add a basic counter of how many DNS64 translations have been completed.

Signed-off-by: Ben Kochie <superq@gmail.com>

* Add DNSSEC bug link

Signed-off-by: Ben Kochie <superq@gmail.com>

* Test cleanup

Signed-off-by: Ben Kochie <superq@gmail.com>

* dns64: more test cleanup

Signed-off-by: Casey Callendrello <c1@caseyc.net>

Co-authored-by: Casey Callendrello <c1@caseyc.net>
2020-03-26 08:42:23 +01:00
Zou Nengren
1dba31ee7d
export config file hash in a metric (#3768)
Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
2020-03-25 14:33:04 +01:00
Chris O'Haver
40c7b9174b
plugin/cache: fix negative cache masking cases (#3744)
* fix negative cache masking cases

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* remove unecessary param

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-03-20 10:05:09 +01:00
Chris O'Haver
d18b48e36c
register missing metric (#3756)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-03-17 21:19:52 +01:00
Miek Gieben
c52a51fac8
parse.HostPortorFile: return error when 0 found (#3742)
* parse.HostPortorFile: return error when 0 found

Return an error when we haven't found any nameservers. This is the
alternative considered in #3735. It's also slighly less code to be
changing.

Replaces: #3741
Closes: #3741 #3735

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

* Add extra test case here as well

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-03-13 14:23:10 +01:00
Darshan Chaudhary
085826776f
Add private DNS support for azure plugin (#3516)
* plugin/azure: fix bug in setting up plugin

Signed-off-by: darshanime <deathbullet@gmail.com>

* plugin/azure: add support for private zones

Signed-off-by: darshanime <deathbullet@gmail.com>

* plugin/azure: change syntax for access level

Signed-off-by: darshanime <deathbullet@gmail.com>

* plugin/azure: change import alias for azure dns

Signed-off-by: darshanime <deathbullet@gmail.com>

* plugin/azure: reword readme, var names

Signed-off-by: darshanime <deathbullet@gmail.com>

* plugin/azure: remove newline in imports

Signed-off-by: darshanime <deathbullet@gmail.com>

* fix import grouping

Co-authored-by: Chris O'Haver <cohaver@infoblox.com>
2020-03-10 15:22:23 -04:00
Christian Tryti
116bda4d27
Add configuration flag to set if RecursionDesired should be set on health checkers in Forward-plugin (#3679)
* Make the RD-flag in health-checks in the Forward-plugin configurable

Introduces a new configuration flag; `health_check_non_recursive`. This
flag makes the health-checker do non-recursive requests when checking
the health of upstream servers.

Signed-off-by: Geir Haugom <ghagit@haugom.org>
Signed-off-by: Christian Tryti <ctryti@gmail.com>

* Changes after feedback from reviewer

* Better tests of health-checks with and without recursion
* Removed the health_check_non_recursive configuration in favor of
extending the existing health_check configuration. Now supports an
optional `no_rec` argument.

Signed-off-by: Christian Tryti <ctryti@gmail.com>

* Add new test that checks setup of health_check.

Signed-off-by: Christian Tryti <ctryti@gmail.com>
2020-03-06 11:52:43 +01:00
Miek Gieben
b8e96b61fc
Update README.md (#3721)
Signed-off-by: imba-tjd <imba-tjd@users.noreply.github.com>
2020-03-05 11:09:19 +01:00
Chris O'Haver
1339b89a8b
explain drop metric (#3706)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-02-29 07:07:49 +00:00
Kohei Yoshida
813cc5d08e
plugin/hosts: Modifies NODATA handling (#3536)
* Modifies NODATA handling

Signed-off-by: ykhr53 <ykhr53@yokohei.com>

* fix some comments

Signed-off-by: ykhr53 <ykhr53@yokohei.com>

* fix test code to take care NODATA

Signed-off-by: ykhr53 <ykhr53@yokohei.com>

* add if statement to avoid nil pointer

Signed-off-by: ykhr53 <ykhr53@yokohei.com>

* Modifies NODATA handling

Signed-off-by: ykhr53 <ykhr53@yokohei.com>

* fix some comments

Signed-off-by: ykhr53 <ykhr53@yokohei.com>

* fix test code to take care NODATA

Signed-off-by: ykhr53 <ykhr53@yokohei.com>

* add if statement to avoid nil pointer

Signed-off-by: ykhr53 <ykhr53@yokohei.com>
2020-02-24 20:03:53 +01:00
Chris O'Haver
6ef105ced3
return all records with matching ip (#3687)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-02-21 07:24:02 +01:00
Miek Gieben
ed1841c36f
metrics: add type to latency as well (#3685)
Automatically submitted.
2020-02-19 08:57:42 +00:00
LongKB
c8a6b16d86
Replacing 'HTTP' by 'HTTPS' for securing links (#3682)
Currently, when we access github.com with HTTP, it is redirected to HTTPS automatically. So this commit aims to replace http://github.com by https://github.com for security.

Signed-off-by: Kim Bao Long <longkb@vn.fujitsu.com>
2020-02-18 08:08:10 +01:00
Andy Bursavich
1da96807ec
plugin/template: fix panic when missing next handler (#3672)
Signed-off-by: Andy Bursavich <abursavich@gmail.com>
2020-02-15 22:11:19 +01:00
Miek Gieben
c4fc5cb54a
plugin/pkg/up: make default intervals shorter (#3651)
* plugin/pkg/up: make default intervals shorter

I think 15 min is too high, make this lower to react faster.

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

* Update README

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-02-06 19:28:53 +01:00
Chris O'Haver
1818df0d06
Update README.md (#3655) 2020-02-05 10:19:04 -05:00
Ricky S
efbe4ac5e8
Add exponential backoff to healthcheck (#3643)
Move exponential backoff initialization to Start()

Signed-off-by: RickyRajinder <singh.sangh@gmail.com>

Move comment

Increase max interval and update README

Remove trailing whitespace

Change Start() param name back to interval
2020-02-04 14:19:48 +01:00
Chris O'Haver
22cd28a798
plugins/forward: Add max_concurrent option (#3640)
* count and limit concurrent queries

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* add option

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* return servfail when limit exceeded

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* docs

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* docs

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* docs

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* review feedback

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* move atomic counter to beginning of struct

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* add comment for ErrLimitExceeded

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* rename option to max_concurrent

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* add metric

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* response REFUSED; incl max in error; add more docs

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* avoid err setup race

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* respond SERVFAIL; doc memory usage

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-02-04 13:59:08 +01:00
Chris O'Haver
c9d567ab44
plugin/kubernetes: fix metadata (#3642)
Automatically submitted.
2020-01-31 19:35:22 +00:00
Miek Gieben
f77c6e55bf
presubmit: test README.md sections (#3644)
Automatically submitted.
2020-01-31 11:37:24 +00:00
Miek Gieben
995179a6c6
presubmit: check import path ordering (#3636)
Add a test for this as well as it's annoying to point out in every code
review.
Fix all the import paths that are flagged by this new test.

Fixes: #3634

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-01-30 09:19:26 +00:00
Chris O'Haver
488464b686
fix error formatting (#3639)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-01-29 11:52:35 -05:00
Miek Gieben
672ce6d04e
Fix acl page (#3626)
* Fix acl page

It must have a Name section.

Fixes: https://github.com/coredns/coredns.io/issues/177

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

* generate

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-01-27 16:47:42 +01:00