* Upgrade caddy to 0.11.2
Redo of #2505 (cherry-picked commit)
Signed-off-by: Miek Gieben <miek@miek.nl>
* .4 has been released
Signed-off-by: Miek Gieben <miek@miek.nl>
* Fix EDNS0 compliance
Do SizeAndDo in the server (ScrubWriter) and remove all uses of this
from the plugins. Also *always* do it. This is to get into compliance
for https://dnsflagday.net/.
The pkg/edns0 now exports the EDNS0 options we understand; this is
exported to allow plugins add things there. The *rewrite* plugin used
this to add custom EDNS0 option codes that the server needs to
understand.
This also needs a new release of miekg/dns because it triggered a
race-condition that was basicly there forever.
See:
* https://github.com/miekg/dns/issues/857
* https://github.com/miekg/dns/pull/859
Running a test instance and pointing the https://ednscomp.isc.org/ednscomp
to it shows the tests are now fixed:
~~~
EDNS Compliance Tester
Checking: 'miek.nl' as at 2018-12-01T17:53:15Z
miek.nl. @147.75.204.203 (drone.coredns.io.): dns=ok edns=ok edns1=ok edns@512=ok ednsopt=ok edns1opt=ok do=ok ednsflags=ok docookie=ok edns512tcp=ok optlist=ok
miek.nl. @2604:1380:2002:a000::1 (drone.coredns.io.): dns=ok edns=ok edns1=ok edns@512=ok ednsopt=ok edns1opt=ok do=ok ednsflags=ok docookie=ok edns512tcp=ok optlist=ok
All Ok
Codes
ok - test passed.
~~~
Signed-off-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Miek Gieben <miek@miek.nl>
* typos in comments
Signed-off-by: Miek Gieben <miek@miek.nl>
Upgrade to new dns lib version; that saw multiple improvements; some
patch releases are in the pipeline.
The big thing here is the removal of ErrTruncated, so we need to deal
with this slightly different in the forward plugin. It removed the
entire truncated.go logic and just checks the message for .Truncated (if
there is a message) and retries with tcp.
Signed-off-by: Miek Gieben <miek@miek.nl>
* plugin/file: Use new zone parser API
Use new dns lib 1.0.14 and default to using the new zone parser that
does not leak go-routines.
Signed-off-by: Miek Gieben <miek@miek.nl>
* Use new API
Signed-off-by: Miek Gieben <miek@miek.nl>
Update Caddy to v0.10.13 so that environment variables may be used after
Go template (e.g. in template's answer). v0.11.0 has been released, but
v0.10.13 is a smaller set of changes and has the necessary fix.
Fixes#2153
The exit code wasn't properly acted upon in the makefile.
Make filename-hyphen actually return an non-zero exit code.
Signed-off-by: Miek Gieben <miek@miek.nl>
This downloads gometalinter (which is now breaking in the CI tests).
Also the goimports target is run with ||true, so nothing will break
if this flags anything (done because of gofmt changes in between
release).
Probably I will setup something to use github's linter API:
https://github.com/markstory/lint-review
Signed-off-by: Miek Gieben <miek@miek.nl>
Correctly set the path for the presubmits, fix some typos and make
the goimport target do the linting to the lint target can be removed.
Also don't make it a fatal error because gofmt changes between releases.
While invoking `make check` from a fresh new environment
the following failure occured:
```
[ec2-user@..... coredns]$ docker run -i -t --rm -v $PWD:/go/src/github.com/coredns/coredns -w /go/src/github.com/coredns/coredns golang:1.10
root@e2d6a6c17132:/go/src/github.com/coredns/coredns# make check
** presubmit/context
** presubmit/test-lowercase
( gometalinter --deadline=2m --disable-all --enable=goimports --vendor --exclude=^pb/ ./... || true )
/bin/sh: 1: gometalinter: not found
go generate coredns.go
```
This fix fixes the issue in Makefile so that deps could be installed first.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* vendor: don't vendor the context stuff
We don't need to vendor this anymore as we moved to the std lib for
these.
* new stuff showing up with dep ensure
* remove go-shlex
* build: add presubmits
We didn't have a way to encode presubmit; with this hack we can just
run a bunch of script on the build; this allows us to automatically
capture things like using the wrong context and maybe other fluff.
This allows us to cut down on code reviews and just have the build fail.
* hook it up
* put presubmit in checks; so we do it for tests as well
* Add explicit exit 1 if things fails
This fix updates go dep with `dep ensure --update` as well as the following:
- Removed github.com/ugorji/go restriction in Gopkg.toml (fixes #1557)
- Added github.com/flynn/go-shlex in Makefile (neede by Caddy, maybe removed later)
This fix fixes#1557
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This fix updates golang.org/x/net to release-branch.go1.10
and golang.org/x/text to v0.3.0, for the purpose of
align with go version 1.10.
This fix also updates README.md to promote using go 1.10.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* go 1.10: update travis and gofmt
fmt now complains about on file tls_test.go, fix that. Also remove
gofmt, as goimports also checks, so this was done twice.
Put go 1.9 and 1.10 in travis for the time being.
* goimports optional
This fix enables goimports check and fixes several imports format
so that the import sections are prettier, e.g.:
```
import (
- "github.com/miekg/dns"
"regexp"
"strconv"
"strings"
+
+ "github.com/miekg/dns"
)
```
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* plugin/forward: add it
This moves coredns/forward into CoreDNS. Fixes as a few bugs, adds a
policy option and more tests to the plugin.
Update the documentation, test IPv6 address and add persistent tests.
* Always use random policy when spraying
* include scrub fix here as well
* use correct var name
* Code review
* go vet
* Move logging to metrcs
* Small readme updates
* Fix readme
* plugin/forward: add out of tree forward plugin
This is a simpler proxy than *proxy*, include by default so it is easier
to switch (i.e. no recompile). It lacks features compared to proxy (did I
say it was simpler), but does cache udp and tcp connection, so it is
faster than proxy.
* Muck with the makefile
* Versioning forward now
The changes in this fix have:
1. checkout master branch of dependencies (non-branch will trigger an error with go get -u)
2. go get -u
3. checkout specific versioon (not necessary a branch).
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This fix fixes version fetched from `go get` so
that versions are guarded.
github.com/mholt/caddy v0.10.10
github.com/miekg/dns v1.0.3
github.com/prometheus/client_golang v0.8.0
golang.org/x/net release-branch.go1.9 (branch)
golang.org/x/text e19ae1496984b1c655b8044a65c0300a3c878dd3
This fix fixes 1368.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
While we at it, why not add a target for Windows as well.
This also introduces a VERBOSE option that defaults to -v, but it empty
when releases so that you can actually see what you're building.
Move an @echo out of shell snippet into the Makefile, as that errored
with @echo: command not found.
Sample run and resulting artifacts:
~~~
% make -f Makefile.release build
% find build -type f -exec file {} \;
build/windows/amd64/coredns: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows
build/darwin/amd64/coredns: Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS>
build/linux/ppc64le/coredns: ELF 64-bit LSB executable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), statically linked, stripped
build/linux/amd64/coredns: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
build/linux/arm/coredns: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, stripped
build/linux/s390x/coredns: ELF 64-bit MSB executable, IBM S/390, version 1 (SYSV), statically linked, stripped
build/linux/arm64/coredns: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, stripped
% make -f Makefile.release tar
% find release -type f | sort
release/coredns_0.9.9_darwin_amd64.tgz
release/coredns_0.9.9_linux_amd64.tgz
release/coredns_0.9.9_linux_arm64.tgz
release/coredns_0.9.9_linux_arm.tgz
release/coredns_0.9.9_linux_ppc64le.tgz
release/coredns_0.9.9_linux_s390x.tgz
release/coredns_0.9.9_windows_amd64.tgz
~~~
Don't use the 'check and godep' target when building for a release, this
is now repeated 6 times for no reason as this is already checked on
travis.
Some other cleanups in the documentation as well.
* integration ci
* rename test
* unfunctionalize DoIntegrationTests
* alphabetize expected answers
* Enable out-of-cluster test
* Enable out-of-cluster test
* move integration tests back to ci repo