Commit Graph

44 Commits

Author SHA1 Message Date
Madhu Venugopal 19ac3ea7f5 Merge pull request #1856 from dmcgowan/update-logrus
Update logrus to v1.0.1
2017-08-08 14:01:10 -07:00
Derek McGowan 43f00b74d7 Update logrus to v1.0.1
Fix case sensitivity issue
Update docker and runc vendors

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-08-07 11:20:47 -07:00
Sebastiaan van Stijn b9be3f5781
Improve debugging for resolver
This patch improves debugging for the resolver;

- prefix debug messages with `[resolver]` for easier finding in the daemon logs
- use `A` / `AAAA` for query-types in the logs instead of their numeric code
- add debug messages if the external DNS did not return a result
- print sucessful results (t.b.d.)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-08-02 17:57:15 +02:00
Flavio Crisciani c6917f91f5
Add gosimple check
Add the gosimple tool check in the Makefile
Fix all the issues identified

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-07-06 09:42:38 -07:00
Santhosh Manohar aad1632c15 Fix the data model inconsistency that breaks daemon upgrade to 1.14-dev
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2017-01-19 14:25:26 -08:00
Alessandro Boch 1ed42d1d80 Merge pull request #1595 from sanimej/host
Add support in embedded DNS server for host loopback resolver
2017-01-05 12:18:48 -08:00
Santhosh Manohar 14ae4337e1 Add embedded DNS server support for host loopback resolver
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-12-22 14:34:13 -08:00
Santhosh Manohar 805efb1843 Defer PTR queries to external servers based on A/AAAA response
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-12-20 14:45:13 -08:00
Santhosh Manohar 38b0775daf Fix incorrect debug message
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-11-29 10:59:29 -08:00
Santhosh Manohar 33819721fb Serialize embedded resolver Start and Stop
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-11-21 11:08:41 -08:00
Daehyeok Mun b735bb2ada Refactoring logrus import and formatting
This fix tries to fix logrus formatting by removing `f` from
`logrus.[Error|Warn|Debug|Fatal|Panic|Info]f` when formatting string
is not present.
Also fix import name to use original project name 'logrus' instead of
'log'

Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
2016-11-08 12:42:41 -07:00
msabansal 52d17c5717 DNS support
Signed-off-by: msabansal <sabansal@microsoft.com>
2016-09-20 13:02:02 -07:00
Santhosh Manohar e51268a429 Drop queries in root doamin when ndots is set
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-09-12 14:25:05 -07:00
Santhosh Manohar 321f0bc2a5 Relax SRV name validation and fix external SRV query handling
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-08-14 11:27:07 -07:00
Santhosh Manohar 51acb81d6f Fix external DNS responses > 512 bytes getting dropped
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-08-03 05:29:32 -07:00
Santhosh Manohar ae40d62a0d Remove UDP connection cachig in embedded DNS server
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-07-23 09:05:49 -07:00
Santhosh Manohar 34bcc235a8 Send truncated external responses to the client
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-07-23 02:56:31 -07:00
Santhosh Manohar ee34cc01e8 For cached connections ignore late replies after read timeout
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-06-13 23:50:02 -07:00
Santhosh Manohar 4b6b13af2c Add support for SRV query in embedded DNS
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-05-19 00:27:59 -07:00
Santhosh Manohar c11d2e9772 Increase concucrrent query limit
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-04-18 19:55:19 -07:00
Jana Radhakrishnan 0dc3da53bd Merge pull request #1125 from sanimej/bugs
Fix a panic in handling forwarded queries
2016-04-22 08:57:32 -07:00
Santhosh Manohar 62ea95b81d Fix a panic in handling forwarded queries
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-04-16 17:20:59 -07:00
Santhosh Manohar ddef81d88c Move the iptables setup for embedded DNS into a reexec process
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-04-15 23:37:20 -07:00
Jana Radhakrishnan 5ca79d6b87 Remove all netlink/osl deps from ipam/ipamutils
Currently ipam/ipamutils has a bunch of dependencies
in osl and netlink which makes the ipam/ipamutils harder
to use independently with other applications. This PR
modularizes ipam/ipamutils into a standalone package
with no OS level dependencies.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-04-10 11:05:39 -07:00
Jana Radhakrishnan f6b02bb181 Resolver sockets not flushed on default gw change
Currently when the default gw changes because of
other network connections happening in the container
the resolver sockets are not flushed. This results
in a subsequent DNS failure for external queries

A sequence of connecting the container to an overlay
network and subsequently to a bridge network without
disconnecting from any network will result in this
behaviour. This was revealed by one of the libnetwork
IT tests.

This is now fixed as part of the commit by flushing
the external query sockets when a default gw change
is detected.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-04-10 10:40:06 -07:00
Santhosh Manohar 786810aea6 Fix the panic when a query response comes after the read() timesout
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-04-07 19:36:06 -07:00
Santhosh Manohar f113c9a2dc Fix the handling for concurrent queries over UDP
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-04-01 10:45:24 -07:00
Santhosh Manohar f9b23d3a3b Limit number of concurrent DNS queries
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-03-29 06:23:01 -07:00
Santhosh Manohar 17c1b137ae On network disconnect clear the cached connections to external
nameservers

Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-03-20 05:00:58 -07:00
Santhosh Manohar be3531759b Avoid V6 queries in docker domain going to external nameservers
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-03-19 03:07:08 -07:00
Santhosh Manohar 39989055da Add AAAA record handling in embedded DNS server
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-03-16 19:00:17 -07:00
Santhosh Manohar 9f43649030 Fix nil pointer reference in ServeDNS() with concurrent go routines.
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-03-15 02:05:38 -07:00
Santhosh Manohar dd925af5f3 Clear cached udp connections on resolver Stop()
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-03-14 17:21:41 -07:00
Santhosh Manohar fdd6e8a8ae Implement DNS RR in the Docker embedded DNS server
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-03-03 09:33:10 -08:00
Santhosh Manohar 258ae9026d Source external DNS queries from container namespace
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-03-03 07:29:32 -08:00
Madhu Venugopal d8ad37d0e2 Merge pull request #894 from sanimej/dns
Set Recursion Available bit in query responses.
2016-02-17 08:42:17 -08:00
Santhosh Manohar 1fc2d0a4cd Add a check for invalid/junk messages
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-02-15 22:31:16 -08:00
Santhosh Manohar 2f46aa1bc6 Set the compress flag for the responses from external DNS servers to
avoid sending DNS replies > 512 bytes

Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-02-07 02:43:29 -08:00
Alessandro Boch 7199d9c0b1 Change in programming iptables in container
- iptables to provide a native API
- resolver.go to invoke the iptables native API
  when programming tables in the container

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-02-05 15:25:43 -08:00
Santhosh Manohar ce6c6e8c35 Set Recursion Available bit in query response and reduce the ttl
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-01-24 05:46:47 -08:00
Madhu Venugopal fd3ef096ad Adding TCP listener for embedded DNS
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-01-22 13:49:22 -08:00
Santhosh Manohar 888c509c5c Retain V6 DNS server in resolv.conf; use only V4 servers for fallback
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-01-19 00:06:19 -08:00
Santhosh Manohar c9dcd08296 Setup embedded DNS server correctly on container restart
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-01-14 10:16:13 -08:00
Santhosh Manohar e9400f356e Embedded DNS server
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-01-07 00:25:26 -08:00