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

Defaults in middleware/chaos don't match documentation #667

Closed
cricketliu opened this issue May 19, 2017 · 1 comment
Closed

Defaults in middleware/chaos don't match documentation #667

cricketliu opened this issue May 19, 2017 · 1 comment

Comments

@cricketliu
Copy link
Contributor

With a minimal Corefile using the chaos middleware:

.:53 {
proxy . 10.102.3.10 10.0.2.60
cache
chaos
errors stdout
log stdout
}

the default behavior is supposed to be to return "CoreDNS-" to a version.bind query, at least according to https://github.com/coredns/coredns/tree/master/middleware/chaos. However, what's returned is just "-":

% dig chaos txt version.bind. @127.0.0.1

; <<>> DiG 9.10.3 <<>> chaos txt version.bind. @127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39416
;; flags: qr rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

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

;; ANSWER SECTION:
version.bind. 0 CH TXT "-"

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri May 19 14:56:19 PDT 2017
;; MSG SIZE rcvd: 67

@miekg
Copy link
Member

miekg commented May 22, 2017

Yes, looks broken. AppName and AppVersion are not properly set.

miekg added a commit that referenced this issue May 22, 2017
Move the version setting into a init function so it is done early. Then
tweak the setup code for chaos a bit to correctly pick this version up.
Add an integration test to pick this up in the toplevel test/ directory.

Fixes #667
johnbelamaric pushed a commit that referenced this issue May 22, 2017
* middleware/chaos: fix version

Move the version setting into a init function so it is done early. Then
tweak the setup code for chaos a bit to correctly pick this version up.
Add an integration test to pick this up in the toplevel test/ directory.

Fixes #667

* Update tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants