{"action":"created","issue":{"url":"https://api.github.com/repos/aacebedo/dnsdock/issues/84","repository_url":"https://api.github.com/repos/aacebedo/dnsdock","labels_url":"https://api.github.com/repos/aacebedo/dnsdock/issues/84/labels{/name}","comments_url":"https://api.github.com/repos/aacebedo/dnsdock/issues/84/comments","events_url":"https://api.github.com/repos/aacebedo/dnsdock/issues/84/events","html_url":"https://github.com/aacebedo/dnsdock/issues/84","id":190756408,"number":84,"title":"Strange (container's) IP addresses resolved by dnsdock","user":{"login":"whitecolor","id":736697,"avatar_url":"https://avatars.githubusercontent.com/u/736697?v=3","gravatar_id":"","url":"https://api.github.com/users/whitecolor","html_url":"https://github.com/whitecolor","followers_url":"https://api.github.com/users/whitecolor/followers","following_url":"https://api.github.com/users/whitecolor/following{/other_user}","gists_url":"https://api.github.com/users/whitecolor/gists{/gist_id}","starred_url":"https://api.github.com/users/whitecolor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whitecolor/subscriptions","organizations_url":"https://api.github.com/users/whitecolor/orgs","repos_url":"https://api.github.com/users/whitecolor/repos","events_url":"https://api.github.com/users/whitecolor/events{/privacy}","received_events_url":"https://api.github.com/users/whitecolor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-21T15:53:03Z","updated_at":"2016-11-27T11:36:16Z","closed_at":null,"body":"Some strange behaviors that I observed but not figured out:\r\n\r\nAfter some time Dnsdock may start to resolve some strange addresses:\r\n`> nslookup client.manager.bbooks.dk` (`client.manager.bbooks.dk` is a DNS name of the container taken from by custom container's `label`)\r\n```\r\nNon-authoritative answer:\r\nName: client.manager.bbooks.dk\r\nAddresses: 6.99.108.105\r\n          172.18.0.2\r\n```\r\n\r\nCorrect address is ` 172.18.0.2` don't know what is `6.99.108.105`, when `dnsdock` responses this way \r\n`> ping client.manager.bbooks.dk`:\r\n```\r\nThe ping request could not find the host client.manager.bbooks.dk. Check the name and\r\nTry again\r\n```\r\nthough `> ping 172.18.0.2`  is reachable.\r\n \r\nSo have to restart `dnsdock` container to get rid of `6.99.108.105`.\r\n\r\nAny suggestions?"},"comment":{"url":"https://api.github.com/repos/aacebedo/dnsdock/issues/comments/263117209","html_url":"https://github.com/aacebedo/dnsdock/issues/84#issuecomment-263117209","issue_url":"https://api.github.com/repos/aacebedo/dnsdock/issues/84","id":263117209,"user":{"login":"aacebedo","id":1217680,"avatar_url":"https://avatars.githubusercontent.com/u/1217680?v=3","gravatar_id":"","url":"https://api.github.com/users/aacebedo","html_url":"https://github.com/aacebedo","followers_url":"https://api.github.com/users/aacebedo/followers","following_url":"https://api.github.com/users/aacebedo/following{/other_user}","gists_url":"https://api.github.com/users/aacebedo/gists{/gist_id}","starred_url":"https://api.github.com/users/aacebedo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aacebedo/subscriptions","organizations_url":"https://api.github.com/users/aacebedo/orgs","repos_url":"https://api.github.com/users/aacebedo/repos","events_url":"https://api.github.com/users/aacebedo/events{/privacy}","received_events_url":"https://api.github.com/users/aacebedo/received_events","type":"User","site_admin":false},"created_at":"2016-11-27T11:36:16Z","updated_at":"2016-11-27T11:36:16Z","body":"Hi\r\n\r\nIn your copy I see the answer counter but not the answers themselves.\r\nHere is what I got when I issue a dig command on ubuntu 16.10. Notice the \"ANSWER SECTION\"\r\n(I am using dnsdock 1.16.1)\r\n```\r\n$ dig @localhost -p 54 foo.example.com         \r\n\r\n; <<>> DiG 9.10.3-P4-Ubuntu <<>> @localhost -p 54 foo.example.com\r\n; (1 server found)\r\n;; global options: +cmd\r\n;; Got answer:\r\n;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13176\r\n;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0\r\n\r\n;; QUESTION SECTION:\r\n;foo.example.com.\t\tIN\tA\r\n\r\n;; ANSWER SECTION:\r\nfoo.example.com.\t0\tIN\tA\t172.17.0.3\r\n\r\n;; Query time: 0 msec\r\n;; SERVER: 127.0.0.1#54(127.0.0.1)\r\n;; WHEN: Sun Nov 27 11:19:30 CET 2016\r\n;; MSG SIZE  rcvd: 64\r\n```\r\n\r\nNow I think your issue may come from the way you've configured dnsdock and the way you've created your container instances.\r\nDnsdock builds its dns record by using metadata from the container instance. More specifically It uses the name of the instance, its image and the domain given to dnsdock.\r\n\r\nIf you start dnsdock this way:\r\n`./dnsdocker --domain example.com`\r\n\r\nDNS records will contain:\r\n`<container instance name>.<container image name>.example.com`\r\n\r\nIt means that if you have multiple instance of the same container image you'll have multiple dns records with the same root `.<container image name>.example.com`\r\n\r\nIf you've instantiated multiple containers instance of your image \"bbooks-rocher\", you will receive multiple responses when resolving bbooks-rocher.k8s.dk (one per container using this image)\r\n\r\nThe solution might be to start your containers with the label com.dnsdock.image different for each container instance.\r\n\r\nCan you check this ?\r\n\r\nRegards\r\n\r\n"}}
{"actor":{"display_login":"aacebedo"}}