aboutsummaryrefslogtreecommitdiff
path: root/server (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-08-20Cleanup and fixes (#223)Gravatar Miek Gieben 4-596/+0
* Set version to 001 * Remove k8stest, test fails is k8s is not there: touch luck * Remove server directory: not used anymore * Disable k8s test (for now) * gometalinter changes
2016-08-19Make CoreDNS a server type plugin for Caddy (#220)Gravatar Miek Gieben 1-32/+15
* Make CoreDNS a server type plugin for Caddy Remove code we don't need and port all middleware over. Fix all tests and rework the documentation. Also make `go generate` build a caddy binary which we then copy into our directory. This means `go build`-builds remain working as-is. And new etc instances in each etcd test for better isolation. Fix more tests and rework test.Server with the newer support Caddy offers. Fix Makefile to support new mode of operation.
2016-08-08Fix stubzone retention (#198)Gravatar Miek Gieben 1-14/+0
Make the receiver a pointer so that the uptdateStubZones map update will retain the stubzones found, unlike the current case where the update will be applied and then promptly forgotten, because it is working on a copy. Add test/etcd_test.go to test a large part of the code. This didn't catch the chaos middleware hack though. The chaos middleware zones are now *not* automatically added. You have to take care of that by yourself (docs updates). When using debug queries and falling through to the next middleware in etcd, restore the original (with o-o.debug) query before passing it on.
2016-06-23Add more metrics (#176)Gravatar Miek Gieben 1-3/+4
2016-04-29Make middleware survive a restart (#142)Gravatar Miek Gieben 1-26/+15
Make middleware that sets up a (http) handler survive a graceful restart. We calls the middleware's Shutdown function(s). If restart fails the Start function is called again. * middleware/health: OK * middleware/pprof: OK * middleware/metrics: OK All restart OK.
2016-04-28Fix graceful reload (#141)Gravatar Miek Gieben 3-101/+42
Fix CoreDNS graceful reloading. This uses the same stuff as Caddy (obviously), but extends it for UDP listeners as well. Also add to the README that we *will* call Shutdown for middleware. Fixes #4
2016-04-21log more for no-such-zoneGravatar Miek Gieben 1-1/+1
2016-04-14Allow more than 1 address for transfer (#121)Gravatar Miek Gieben 1-1/+5
No reason why not to allow more then one address: `transfer to 127.0.0.1 10.240.20.1`. Fix startup as well, as it turned out to be broken...
2016-04-13Failed startup was not flagged (#118)Gravatar Miek Gieben 1-3/+1
The error propagation from srv.ListenAndServe did not work as intended, simplified it a bit and added a test for it.
2016-04-10Add TestServer (#102)Gravatar Miek Gieben 1-16/+36
Add a fullblown testing server. This allows us to do integration tests. Also add a basic proxy test. Further tests will test etcd proxy and stub zone communication and other "wildish" configurations. Redo the server startup, so we can access the ports it listens on when it has started up (with dns.ActivateAndServer). Extend the .travis file to download etcd and test for that as well. Put integration tests in test dir
2016-04-09Use *dns.Server (#99)Gravatar Miek Gieben 1-2/+12
This does not fix the reload issue, but will give us flexibility to access the packetConn and listener to make this all work.
2016-04-09Dont log per qtype - fun and all, but not really usefulGravatar Miek Gieben 1-3/+3
2016-04-09correct EDNS responses (#96)Gravatar Miek Gieben 1-9/+6
Tests updated as well and all the middleware. And Prometheus renamed to metrics (directive is still prometheus).
2016-04-09EDNS: return error on wrong version. (#95)Gravatar Miek Gieben 1-7/+10
Split up the previous changes a bit. This PR only returns the expected error when the received packet has the wrong EDNS version. EDNS0 handling in the middleware needs a nicer abstraction, like ReflectEdns() or something.
2016-04-06Add AXFR testGravatar Miek Gieben 1-6/+6
Test shouldTransfer by upping a testserver and sending the SOA query. Remove state from DefaultErrorHandler and just get it from the request. Add more logging to show what is going on. This also adds the infrastructure for future tests.
2016-04-06use dropped for this metricGravatar Miek Gieben 1-2/+4
2016-04-06Enable monitoring for non middlewareGravatar Miek Gieben 1-0/+13
If monitoring is enabled for one zone, also enable it for when the server reports REFUSED. Normally the metrics are only enabled if you enter the middleware, with this you'll see REFUSED queries. Each of these are reported agains the root zone otherwise
2016-04-04Cleanup docs and the chaos middlewareGravatar Miek Gieben 1-1/+14
Make the CH middleware actually work. Needs a bit of a hack to route the fake version.bind and friends zone to the correct handler. Fiddle with the order in directive.go so that CH queries get logged as well. Secondly add class rewriting to the rewrite middleware handler and also log the class by default.
2016-04-03Fix Corefile parsingGravatar Miek Gieben 1-0/+1
Fix some file/secondary issues when parsing a Corefile, also allow for multiple origins to be specified. Also don't fail on startup when a zonetransfer fails. Fixes: #54
2016-04-02Answer REFUSED when we don't host the zoneGravatar Miek Gieben 1-2/+2
Change from SERVFAIL to diff. between error and no such zone hosted. Fixes: #68
2016-03-19Proxy cleanupsGravatar Miek Gieben 1-3/+17
Remove things not supported, fix docs.
2016-03-19Random fixes and make servfail the special return codeGravatar Miek Gieben 1-6/+3
2016-03-19Fix failing on startupGravatar Miek Gieben 1-22/+8
When we cannot bind to the port, return an error which will make CoreDNS fail startup. Still a bit hackish, but good enough.
2016-03-19Use context.ContextGravatar Miek Gieben 1-2/+5
Rename the old Context to State and use context.Context in the middleware for intra-middleware communication and more.
2016-03-18First commitGravatar Miek Gieben 5-0/+635