Commit Graph

77 Commits

Author SHA1 Message Date
James Phillips 0bdbdf1ba8 Merge pull request #2226 from abhinavdahiya/rm-health-unknown
Fixes #1775; Removes 'unknown' state
2016-08-17 17:51:04 -07:00
James Phillips 6c4a8d8383
Tweaks DNS prepared query failover unit test. 2016-08-12 17:16:08 -07:00
Max Timchenko 90f49354d6
Corrects two issues with DNS prepared query failover
When DNS prepared query fails over to another datacenter and the datacenter
returns some nodes, the DNS result does not translate WAN addresses even when
translation is enabled for SRV and A queries, and returns the wrong datacenter
(the one that failed over) for SRV queries.
2016-08-12 17:06:43 -07:00
James Phillips a666dc44b3
Passes the index by reference so we can control the allocation. 2016-08-12 14:51:50 -07:00
James Phillips de95fe8638
Makes name compares case-insensitive. 2016-08-12 12:16:21 -07:00
James Phillips 6c22c48326
Fixes the DNS SRV trim bug. 2016-08-11 21:46:14 -07:00
James Phillips 086a5af5ff
Finishes up DNS compression by adding opt-out, tests, and documentation. Fixes trim routine. 2016-08-11 16:27:08 -07:00
Abhinav Dahiya 9dc52449e3 Fixes #1775; Removes 'unknown' state
Signed-off-by: Abhinav Dahiya <abhinavdtu2012@gmail.com>
2016-07-30 19:33:14 +05:30
Ryan Uber 5089561b1b agent: test that DNS passes the agent data through 2016-07-01 09:46:26 -07:00
Sean Chittenden 85c1da796d Change tests to accept an "at least this many" answers semantic
The size of answers vary based on the target platform.  Accomodate this variance.
2016-03-30 11:48:32 -07:00
Sean Chittenden 12f1a71f00 Fix tests
I'm not sure how I thought this passed last night, it was obviously wrong.
2016-03-30 10:16:05 -07:00
Sean Chittenden 9d7a6d895a Use table-driven test for response limits
Much more exhaustive testing and shows where the limits are of the 512B limitation (quering by ID is less space efficient than querying by just a prepared query or service).
2016-03-30 01:05:49 -07:00
Sean Chittenden 49f8b147b8 Remove duplicate paste-o
Pointed out by: slackpad
2016-03-29 23:31:31 -07:00
Sean Chittenden 8f7bed30a6 Test services and PQT limits 2016-03-29 23:08:58 -07:00
Sean Chittenden 6392dfe0e3 Improve the use of constants across DNS tests 2016-03-29 23:08:40 -07:00
Sean Chittenden a29f6e8c8f Allow adjusting the number of DNS records in a response...
Based on work done by @fusiondog in #1583, extend the concept to use an integer instead of a boolean.

Fixes: #1583 && #1481
2016-03-29 19:23:56 -07:00
James Phillips b132e8f21b Tweaks algorithm so it's safe with an empty list and adds a PQ test. 2016-03-08 23:09:09 -08:00
Igor Dubinskiy f4edb28ef3 Make sure UDP DNS responses aren't larger than allowed 2016-03-07 16:41:17 -08:00
James Phillips 6797b3ee85 Adds a test to make sure we get the local address within the DC. 2016-02-07 14:16:15 -08:00
James Phillips 79bd1fd4bb Sets up config for more address tags down the road, renames struct members. 2016-02-07 10:37:34 -08:00
Evan Gilman 71cf39b5f8 Use a map for additional node addresses 2016-02-06 23:01:45 -08:00
Evan Gilman a8fd9542dc Add tests for consul WAN translation 2016-02-06 23:01:45 -08:00
James Phillips a364a02da6 Avoids taking the length again when parsing DNS queries. 2015-11-17 08:40:47 -08:00
James Phillips 267c352c6d Adds a test to make sure a stale retry terminates. 2015-11-15 17:06:00 -08:00
James Phillips c9ef552385 Plumbs the service name back and uses agent-specific TTL settings as a fallback. 2015-11-15 17:06:00 -08:00
James Phillips cad6938474 Adds unit tests for prepared queries and DNS, using existing tests for equivalence. 2015-11-15 17:06:00 -08:00
James Phillips 67408fe477 Fixes unit test fail due to expected truncated message. 2015-11-12 18:16:44 -08:00
Wim 3d7c3725d8 Allow AAAA queries for nodeLookup 2015-09-08 16:54:36 +02:00
Wim 2336c6a4bd No NXDOMAIN when the answer is empty 2015-09-02 16:12:22 +02:00
Wim e97973c1e1 Limit the DNS responses after getting the NodeRecords 2015-09-01 23:23:05 +02:00
Wim b806aceef4 Return SOA/not found when the answer is empty 2015-09-01 22:28:12 +02:00
Ryan Breen 20f17a0cc8 Test for GH-1142. 2015-07-29 18:21:16 -04:00
Ryan Uber f424f94d45 agent: vet fixes 2015-07-14 11:42:51 -07:00
Wim e70e57a0dc Send SOA with negative responses 2015-06-14 00:03:44 +02:00
Ryan Uber b2556bd4d0 agent: testing dns when acls are in use 2015-06-12 16:01:57 -07:00
Armon Dadgar c457b6cb75 agent: Adding test for DNS enable_truncate 2015-05-05 14:14:41 -07:00
Ryan Uber cd65aaa2e0 agent: re-work DNS tests to not rely on the external network 2015-04-14 12:52:26 -07:00
Ryan Uber 05194033f8 agent: Add test for CNAME recursion 2015-04-14 12:52:26 -07:00
Ryan Uber 4d950f91cb agent: fix dns test 2015-04-01 10:58:05 -07:00
Matt Good 755522fa48 Remove unnecessary DNS test entry
By using the startup callbacks, the DNS test entry is not needed to check that
the server is alive.
2015-03-31 16:50:44 -07:00
Ryan Uber 15de24c844 agent: more lenient dns response test 2015-01-22 15:31:12 -08:00
Armon Dadgar 1bfe8efbac Merge pull request #595 from ebroder/dns-only-passing
Add "only_passing" option to DNS config
2015-01-13 12:07:22 -08:00
Evan Broder a9ce71e304 Add more thorough testing for only_passing behavior 2015-01-13 14:59:24 +01:00
Ryan Uber 793a7b74aa agent: make dns randomization test more reliable 2015-01-12 16:05:41 -08:00
Armon Dadgar 3689b82cf4 agent: Adding test for DNS lookup with service address 2015-01-08 11:58:32 -08:00
Armon Dadgar 7d9697dcf3 agent: Testing reverse lookup with custom TLD 2015-01-08 10:24:49 -08:00
lalyos adc5d0a522 agent: implementing reverse dns lookup for ipv4 and ipv6 2014-11-23 09:16:37 +01:00
foostan 4d8f1c2133 Add multiple recursor definition support 2014-11-01 04:26:26 +09:00
Armon Dadgar 55c695493b agent: Address overrides. Fixes #301 and #253 2014-09-02 12:47:40 -07:00
Gavin M. Roy 97b8960bd8 Add RFC-2782 style SRV lookups 2014-08-18 15:45:56 -04:00