preetapan
f34730e3ee
Fixed regression with dns server start condition ( #3137 )
2017-06-09 15:50:06 -07:00
Seth Vargo
f4b36e8d90
Simplify
2017-06-09 14:55:04 -04:00
Seth Vargo
55161869a7
Update comment
2017-06-09 14:51:34 -04:00
Seth Vargo
b20902b7e2
Parse values given to ?passing in the API
...
This PR fixes GH-2212 in the most backwards-compatible way I can think
of. If the user does not pass a value for `?passing`, it's assumed to be
true, which mirrors the current behavior. However, if the user passes
any value for passing, that value is parsed as a bool using strconv.
It's important to note that this is technically a breaking change.
Previously using `?passing=false` would return only passing nodes. While
this behavior is obviously incorrect, it was the previous behavior. We
should call this out very clearly in the CHANGELOG.
2017-06-09 14:36:00 -04:00
James Phillips
a5cc8434ce
Opens up timing bound on flaky test.
2017-06-08 21:37:52 -07:00
James Phillips
a7c910be7c
Fixes HTTP header compare by including standard headers.
2017-06-08 14:10:46 -07:00
Frank Schroeder
17051c6870
agent: fix time.Duration parsing
...
The duration can be passed as a string, a float64 or a time.Duration
and this patch handles this properly.
2017-06-08 22:42:49 +02:00
Frank Schroeder
d284d061c9
agent: log events and exit code to the log file
...
This patch logs the signals, events, errors and the exit
code to the log file instead of printing it on the console.
This should provide a more complete picture for debugging.
2017-06-08 10:07:55 +02:00
Frank Schroeder
d98f0f7bab
log: use prefix [ERR] instead of [ERROR]
2017-06-08 09:50:47 +02:00
James Phillips
e32b42a222
Updates static assets to latest.
2017-06-07 21:16:59 -07:00
James Phillips
fd7c3c5cfa
Merge pull request #3121 from hashicorp/increase-graceful-timeout
...
agent: increase graceful shutdown timeout
2017-06-07 10:42:19 -07:00
Frank Schroeder
247e44e787
agent: increase graceful shutdown timeout
...
When triggering a leave through an INT/TERM signal the hard-coded
timeout of 5 seconds is too short to complete the leave successfully.
Therefore, the agent always times out.
This value should probably configurable.
2017-06-07 13:12:34 +02:00
Frank Schroeder
fc2ed18423
agent: log differnt shutdown stages
...
Log the different code paths during shutdown.
2017-06-07 13:11:04 +02:00
Frank Schröder
e206ab5cb6
agent: support custom header and method for http checks ( #3106 )
...
This patch adds support for custom headers and
method for HTTP checks.
Fixes #2474
Fixes #2657
Fixes #3106
2017-06-07 01:11:56 +02:00
Frank Schroeder
0133ab135a
test: refactor TestDecodeConfig test
...
This patch refactors the multiple tests for
DecodeConfig into a single table-driven test
that tests most fields individually.
2017-06-04 23:55:12 +02:00
Frank Schroeder
35f2377702
test: Fix TestAgent_Reload
...
This test was still referring to cmd.agent which has been removed.
2017-06-04 22:45:40 +02:00
James Phillips
037f72813b
Merge pull request #3105 from hashicorp/test-stability
...
Tweaks things for better test stability.
2017-06-03 10:09:12 -07:00
Frank Schroeder
92b2192b75
agent: fix graceful http server shutdown
2017-06-03 19:08:50 +02:00
Frank Schroeder
9779f7ef02
agent: cleanup run method
2017-06-03 19:08:50 +02:00
Frank Schroeder
b3e94082b0
agent: move registerWatches out of the run method
2017-06-03 19:08:50 +02:00
Frank Schroeder
5c08953449
agent: move telemetry out of the run method
2017-06-03 19:08:50 +02:00
Frank Schroeder
7c8b2be86d
agent: move update check out of the run method
2017-06-03 19:08:50 +02:00
Frank Schroeder
055347f7cd
agent: simplify signal handling
2017-06-03 19:08:50 +02:00
Frank Schroeder
6262d85dab
agent: move config reloading into the agent
2017-06-03 19:08:50 +02:00
Frank Schroeder
02ce45e5bb
agent: move parseMetaPair to config and export
2017-06-03 19:08:50 +02:00
Frank Schroeder
34c981ba55
agent: remove agent from command
...
Decouple command and agent a bit more.
2017-06-03 19:08:50 +02:00
Frank Schroeder
63d336e11c
agent: move retry join into agent
2017-06-03 19:08:50 +02:00
Frank Schroeder
488beeb208
agent: add GossipEncrypted function
...
Remove dead code and expose a GossipEncrypted() method
on the agent instead of accessing the internal delegate.
2017-06-03 19:08:50 +02:00
James Phillips
26677b4117
Cleans up an unrelated vet error.
2017-06-02 21:07:15 -07:00
James Phillips
3795f17b3b
Adds back the port shuffle on agent start retries.
2017-06-02 20:53:20 -07:00
Frank Schroeder
d314a539da
Do not recurse when the service address is a local cname
...
Fixes #2795
2017-06-01 18:20:31 +02:00
Frank Schroeder
7f18fe1a5b
agent: LastContact cannot be negative ( #3067 )
...
The X-Consul-LastContact header cannot be negative.
Fixes #3067
2017-06-01 18:20:12 +02:00
Frank Schroeder
dbe8009968
test: replace one more BoolFalse with agent.Bool()
2017-05-31 11:41:17 +02:00
Frank Schroeder
00117ed09b
test: we will not use dev mode for testing for now
2017-05-31 11:34:00 +02:00
Frank Schroeder
d14182c2de
test: stagger retry attempts of TestAgent.Start
2017-05-31 11:33:25 +02:00
Frank Schroeder
5224699341
test: make TestAgent setup reusable
...
Pick the random ports only once and try starting with them
a number of times so that the configuration can be re-used.
This is because the ports are written into the data files
and a subsequent agent reading the files needs to have the
same ports.
For the same reason we do not remove the data directory on
every attempt since this makes it impossible to re-read the
data files.
2017-05-31 11:32:31 +02:00
Frank Schroeder
b06c969deb
agent: use agent logger for consul client and deps
2017-05-31 11:05:02 +02:00
Frank Schroeder
2588f22be7
test: start secondary agents also via TestAgent
2017-05-31 10:56:19 +02:00
Frank Schroeder
4e6e9cb05a
agent: set tcpKeepAliveListener when there is no error
2017-05-31 10:24:32 +02:00
Frank Schroeder
cfe101ce49
test: use test name as log prefix
2017-05-31 09:54:09 +02:00
Frank Schroeder
c587561572
agent: simplify shutdown timeout logging
...
Note that we are currently timing out every time. This still
needs to be investigated.
2017-05-31 09:41:58 +02:00
Frank Schroeder
b220133785
agent: set proto to http since we are logging it now
2017-05-31 09:41:16 +02:00
Frank Schroeder
361b69bb30
test: Use Bool() instead of &BoolTrue/False since
2017-05-31 09:21:01 +02:00
Frank Schroeder
bb8a21c385
Address review comments
2017-05-31 01:05:21 +02:00
Frank Schroeder
78cd7a9087
agent: start HTTPS only if there is a cert and key
2017-05-31 00:29:29 +02:00
Frank Schroeder
45a9c2be8b
agent: refactor DNS and HTTP server
...
* refactor DNS server to be ready for multiple bind addresses
* drop tcpKeepAliveListener since it is default for the HTTP servers
* add startup timeout watcher for HTTP servers identical to DNS server
2017-05-31 00:29:29 +02:00
Frank Schroeder
35757e6c09
test: increase sleep time for test
2017-05-31 00:29:28 +02:00
Frank Schroeder
42ade30551
test: allow tests to control anti-entropy syncs
2017-05-31 00:29:28 +02:00
Frank Schroeder
5735b31ebc
test: run mock dns recursors on random ports
2017-05-31 00:29:28 +02:00
Frank Schroeder
d07f2a2542
test: skip tests that use cmd.Run until signal handling is fixed
2017-05-31 00:29:28 +02:00