weaveworks / weave

Simple, resilient multi-host containers networking and more.
https://www.weave.works
Apache License 2.0
6.62k stars 670 forks source link

Adding an entry to nameserver for a domain which is not a subdomain of the main domain fails silently #2195

Open brb opened 8 years ago

brb commented 8 years ago

To reproduce:

$ weave dns-add c42 -h foo
$ echo $?
0
$ weave dns-add 192.168.0.1 -h bar
$ echo $?
0
$ weave report -f "{{.DNS.Entries}}"
[{c42.weave.local. 1a:b8:95:98:72:98 6665f2c4ca30b16021acbb9c6412eb711eb014a63ed6de27938471de3afc663a 10.32.0.1 0 0}]

Inspecting the weave container logs reveals:

INFO: 2016/04/20 10:52:11.260060 [nameserver 1a:b8:95:98:72:98] Ignoring registration foo. 10.32.0.1 6665f2c4ca30b16021acbb9c6412eb711eb014a63ed6de27938471de3afc663a (not a subdomain of weave.local.)
INFO: 2016/04/20 10:52:33.882790 [nameserver 1a:b8:95:98:72:98] Ignoring registration bar. 192.168.0.1 weave:extern (not a subdomain of weave.local.)

I am using the latest version of the master branch (07780fa10c5da77300b518a799f46a9a1484c486).

rade commented 8 years ago

I don't consider this to be a bug. It is a valid issue though.