Pierre Souchay
903e866835
Only update services if tags are different
2018-02-20 23:08:04 +01:00
Pierre Souchay
56d5c0bf22
Enable Raft index optimization per service name on health endpoint
...
Had to fix unit test in order to check properly indexes.
2018-02-20 01:35:50 +01:00
Pierre Souchay
ec1b278595
Get only first service to test whether we have to cleanup index of a service
2018-02-19 22:44:49 +01:00
Pierre Souchay
523feb0be4
Fixed comment about raftIndex + use test.Helper()
2018-02-19 19:30:25 +01:00
Pierre Souchay
4c188c1d08
Services Indexes modified per service instead of using a global Index
...
This patch improves the watches for services on large cluster:
each service has now its own index, such watches on a specific service
are not modified by changes in the global catalog.
It should improve a lot the performance of tools such as consul-template
or libraries performing watches on very large clusters with many
services/watches.
2018-02-19 18:29:22 +01:00
Kyle Havlovitz
ea452c6032
Fix the coordinate update endpoint not passing the ACL token
2018-02-15 11:58:02 -08:00
Andrei Burd
dbb010c865
adding human readability for dns requests debug log ( #3751 )
2018-02-11 09:02:28 -06:00
James Phillips
37cf6583db
Fixes a panic on TCP-based DNS lookups.
...
This came in via the monkey patch in #3861 .
Fixes #3877
2018-02-08 17:57:41 -08:00
James Phillips
4f3b4d0e55
Addresses additional state mutations.
...
Did a sweep of 84d6ac2d51
and checked them all.
2018-02-07 07:02:10 -08:00
James Phillips
ca461f8890
Fixes all the racy output-side updates to tags.
2018-02-06 20:35:55 -08:00
James Phillips
e7dd7b2d13
Adds a more robust unit test for index churn.
2018-02-06 20:35:38 -08:00
James Phillips
41e3fcf205
Makes server manager shift away from failed servers from Serf events.
...
Because this code was doing pointer equality checks, it would work for
the case of a failed attempted RPC because the objects are from the
manager itself:
https://github.com/hashicorp/consul/blob/v1.0.3/agent/consul/rpc.go#L283-L302
But the pointer check would always fail for events coming in from the
Serf path because the server object is newly-created:
https://github.com/hashicorp/consul/blob/v1.0.3/agent/router/serf_adapter.go#L14-L40
This means that we didn't proactively shift RPC traffic away from a
failed server, we'd have to wait for an RPC to fail, which exposes
the error to the calling client.
By switching over to a name check vs. a pointer check we get the correct
behavior. We added a DEBUG log as well to help observe this behavior during
integrated testing.
Related to #3863 since the fix here needed the same logic duplicated, owing
to the complicated atomic stuff.
/cc @dadgar for a heads up in case this also affects Nomad.
2018-02-05 17:56:00 -08:00
James Phillips
c718459e49
Adds a before/after test for #3845 .
2018-02-05 16:18:29 -08:00
James Phillips
5b245c0201
Merge pull request #3845 from 42wim/tagfix
...
Fix service tags not added to health check. Part two
2018-02-05 16:18:00 -08:00
Kyle Havlovitz
46745eb89b
Add enterprise default config section
2018-02-05 13:33:59 -08:00
James Phillips
0aa05cc5f0
Merge pull request #3855 from hashicorp/pr-3782-slackpad
...
Adds support for gRPC health checks.
2018-02-02 17:57:27 -08:00
James Phillips
1a08e8c0f1
Changes "TLS" to "GRPCUseTLS" since it only applies to GRPC checks.
2018-02-02 17:29:34 -08:00
Wim
5cc76cce09
Fix service tags not added to health check. Part two
2018-01-29 20:32:44 +01:00
Veselkov Konstantin
c2395d9bd0
fix refactoring
2018-01-28 22:53:30 +04:00
Veselkov Konstantin
c4ad54e057
fix refactoring
2018-01-28 22:48:21 +04:00
Veselkov Konstantin
05666113a4
remove golint warnings
2018-01-28 22:40:13 +04:00
James Phillips
443250c76c
Improves user lookup error message.
...
Closes #3188
Closes #3184
2018-01-26 07:56:44 -08:00
Kyle Havlovitz
32dbb51c3b
Remove nonvoter from metadata.Server
2018-01-25 17:08:03 -08:00
James Phillips
38f5b2e7ce
Gets rid of named return parameters.
...
This wasn't wrong before but we don't generally use this style in
Consul.
2018-01-25 14:29:50 -08:00
James Phillips
1acaaecbdd
Moves non-stdlib includes into their own section.
2018-01-25 14:26:15 -08:00
Kyle Havlovitz
0e76d62846
Reset clusterHealth when autopilot starts
2018-01-23 12:52:28 -08:00
Kyle Havlovitz
6d1dbe6cc4
Move autopilot health loop into leader operations
2018-01-23 11:17:41 -08:00
James Phillips
a4c3a3433c
Updates web assets to latest.
2018-01-22 14:46:07 -08:00
Kyle Havlovitz
c4528a6110
Merge pull request #3821 from hashicorp/persist-file-handling
...
Add graceful handling of malformed persisted service/check files.
2018-01-22 12:31:33 -08:00
Kyle Havlovitz
bb068b4c93
Merge pull request #3820 from hashicorp/serfwan-port-fix
...
Enforce a valid port for the Serf WAN since it can't be disabled.
2018-01-19 15:40:56 -08:00
James Phillips
77ab587ae1
Moves the coordinate fetch after the ACL check.
2018-01-19 15:25:22 -08:00
Kyle Havlovitz
b651253cb2
Don't remove the files, just log an error
2018-01-19 14:25:51 -08:00
Kyle Havlovitz
f191eb2df3
Enforce a valid port for the Serf WAN since it can't be disabled.
...
Fixes #3817
2018-01-19 14:22:23 -08:00
Kyle Havlovitz
17ec4a9394
Add graceful handling of malformed persisted service/check files.
...
Previously a change was made to make the file writing atomic,
but that wasn't enough to cover something like an OS crash so we
needed something here to handle the situation more gracefully.
Fixes #1221 .
2018-01-19 14:07:36 -08:00
James Hartig
81d0ffc959
Resolve symlinks in config directory
...
Docker/Openshift/Kubernetes mount the config file as a symbolic link and
IsDir returns true if the file is a symlink. Before calling IsDir, the
symlink should be resolved to determine if it points at a file or
directory.
Fixes #3753
2018-01-12 15:43:38 -05:00
James Phillips
ca43623734
Adds the NodeID field back to the /v1/agent/self Config block.
...
Fixes #3778
2018-01-10 15:17:54 -08:00
James Phillips
ff2aae98f4
Adds more info about how to fix the private IP error.
...
Closes #3790
2018-01-10 09:53:41 -08:00
James Phillips
e282e9285c
Fixes crash where body was optional for PQ endpoint (it is not).
...
Fixes #3791
2018-01-10 09:33:49 -08:00
Dmytro Kostiuchenko
a45f6ad740
Add gRPC health-check #3073
2018-01-04 16:42:30 -05:00
Diptanu Choudhury
f597d66392
Using labels
2017-12-21 20:30:29 -08:00
Diptanu Choudhury
ac50568a1a
Added telemetry around Catalog APIs
2017-12-21 16:35:12 -08:00
James Phillips
1cd94dec8a
Updates the checked in web assets.
2017-12-20 19:51:04 -08:00
James Phillips
bfce81d721
Updates the built-in web assets.
2017-12-20 17:48:51 -08:00
James Phillips
8fd94a2e7c
Wraps HTTP mux to ban all non-printable characters from paths.
2017-12-20 15:47:53 -08:00
James Phillips
6f09cf48db
Updates the built-in web UI assets.
2017-12-20 13:43:52 -08:00
James Phillips
62e97a6602
Fixes a go fmt
cleanup.
2017-12-20 13:43:38 -08:00
Kyle Havlovitz
74b0c58831
Fix vet error
2017-12-18 18:04:42 -08:00
Kyle Havlovitz
dfc165a47b
Move autopilot initializing to oss file
2017-12-18 18:02:44 -08:00
Kyle Havlovitz
044c38aa7b
Move autopilot setup to a separate file
2017-12-18 16:55:51 -08:00
Kyle Havlovitz
9e1ba6fb4e
Make some final tweaks to autopilot package
2017-12-18 12:26:47 -08:00