2736 Commits

Author SHA1 Message Date
hc-github-team-consul-core
7431fbeda0
update bindata_assetfs.go 2021-06-21 21:38:00 +00:00
Matt Keeler
0242dcc5d2
Add ability to load a license from the configuration/environment (#10441)
This is mainly for forward compatibility with 1.10 where licensing requirements are changing.

For older releases we are adding the ability to load the license from a configuration/environment to facilitate a smoother upgrade process. For servers, we will allow the configuration to be set but it will not be used (a warning log is emitted saying as much). For client agents it will actually cause the license to be used in place of the auto-retrieval process.

Unlike with 1.10, client agents will not be able to update the license loaded via config with a reload. It is expected that this configuration is only used while on the path to upgrading to 1.10 and therefore the ability to reload the license should not be necessary.
2021-06-21 15:00:46 -04:00
Matt Keeler
94e4ef0c17
Hold onto the token store from the base deps in the Client (#10432)
This is needed in order to access the agent token in some enterprise code.
2021-06-18 16:34:23 -04:00
Dhia Ayachi
796ebbe5f5 improve monitor performance (#10368)
* remove flush for each write to http response in the agent monitor endpoint

* fix race condition when we stop and start monitor multiple times, the doneCh is closed and never recover.

* start log reading goroutine before adding the sink to avoid filling the log channel before getting a chance of reading from it

* flush every 500ms to optimize log writing in the http server side.

* add changelog file

* add issue url to changelog

* fix changelog url

* Update changelog

Co-authored-by: Daniel Nephin <dnephin@hashicorp.com>

* use ticker to flush and avoid race condition when flushing in a different goroutine

* stop the ticker when done

Co-authored-by: Daniel Nephin <dnephin@hashicorp.com>

* Revert "fix race condition when we stop and start monitor multiple times, the doneCh is closed and never recover."

This reverts commit 1eeddf7a

* wait for log consumer loop to start before registering the sink

Co-authored-by: Daniel Nephin <dnephin@hashicorp.com>
2021-06-15 16:23:24 +00:00
hc-github-team-consul-core
980c99c988
update bindata_assetfs.go 2021-06-04 20:45:52 +00:00
Paul Ewing
ef533f7c33
usagemetrics: add cluster members to metrics API (#10340) (#10346)
This PR adds cluster members to the metrics API. The number of members per
segment are reported as well as the total number of members.

Tested by running a multi-node cluster locally and ensuring the numbers were
correct. Also added unit test coverage to add the new expected gauges to
existing test cases.
2021-06-03 10:35:45 -07:00
Dhia Ayachi
4249ac9b0e debug: remove the CLI check for debug_enabled (#10273)
* debug: remove the CLI check for debug_enabled

The API allows collecting profiles even debug_enabled=false as long as
ACLs are enabled. Remove this check from the CLI so that users do not
need to set debug_enabled=true for no reason.

Also:
- fix the API client to return errors on non-200 status codes for debug
  endpoints
- improve the failure messages when pprof data can not be collected

Co-Authored-By: Dhia Ayachi <dhia@hashicorp.com>

* remove parallel test runs

parallel runs create a race condition that fail the debug tests

* Add changelog

Co-authored-by: Daniel Nephin <dnephin@hashicorp.com>
2021-05-31 15:29:05 -04:00
Daniel Nephin
c6b8815d5f Merge pull request #10272 from hashicorp/dnephin/backport-namespace-license-fix
Backport some ent changes for serf tags
2021-05-21 16:35:34 +00:00
Daniel Nephin
181621bd13 Merge pull request #8812 from jjshanks/GH-8728
GH-8728 add raft default values
2021-05-18 19:33:13 +00:00
R.B. Boyer
3357a14339
server: ensure that central service config flattening properly resets the state each time (#10245)
The prior solution to call reply.Reset() aged poorly since newer fields
were added to the reply, but not added to Reset() leading serial
blocking query loops on the server to blend replies.

This could manifest as a service-defaults protocol change from
default=>http not reverting back to default after the config entry
reponsible was deleted.

Backport of #10239 to 1.9.x
2021-05-14 13:20:49 -05:00
R.B. Boyer
89180eb281
agent: ensure we hash the non-deprecated upstream fields on ServiceConfigRequest (#10240) (#10244)
Backport of #10240 to 1.9.x
2021-05-14 10:49:18 -05:00
R.B. Boyer
a179607457
[1.9.x] connect: update supported envoy versions to 1.16.4, 1.15.5, 1.14.6, and 1.13.7 (#10232)
manual backport of #10231 to 1.9.x
2021-05-12 14:26:56 -05:00
Daniel Nephin
1aa15c7c61 agent/local: only fallback to agent token for deletes
Fallback to the default user token for synching registrations.
2021-05-10 16:04:05 -04:00
Daniel Nephin
3dc91798c6 agent/local: do not persist the agent tokens
Only default to the user token and agent token for the sync. Change the
exported methods to only return the stored tokens associated with a
specific check or service.
2021-05-10 16:03:30 -04:00
Daniel Nephin
cd55f89f84 Merge pull request #10189 from hashicorp/dnephin/http-api-health-query-meta
http: set consistency header properly for health endpoint
2021-05-06 18:05:50 +00:00
Luke Kysow
6675af4b0a Give descriptive error if auth method not found (#10163)
* Give descriptive error if auth method not found

Previously during a `consul login -method=blah`, if the auth method was not found, the
error returned would be "ACL not found". This is potentially confusing
because there may be many different ACLs involved in a login: the ACL of
the Consul client, perhaps the binding rule or the auth method.

Now the error will be "auth method blah not found", which is much easier
to debug.
2021-05-03 20:39:55 +00:00
R.B. Boyer
ee30a54c7f
[1.9.x] connect: update supported envoy versions to 1.16.3, 1.15.4, 1.14.7, 1.13.7 (#10105) 2021-04-29 15:49:16 -05:00
Matt Keeler
aa2099d12a Add prometheus guage definitions for replication metrics. (#10109) 2021-04-23 21:06:21 +00:00
Matt Keeler
7093e48f97
[Backport/1.9.x] Backport #10073 (#10104)
* Merge pull request #10094 from hashicorp/update-fingerprint

updating fingerprint

* Add replication metrics (#10073)

Co-authored-by: Daniel Nephin <dnephin@hashicorp.com>
2021-04-23 16:17:09 -04:00
Kyle Havlovitz
f65b9ac4cf Merge pull request #9672 from hashicorp/ca-force-skip-xc
connect/ca: Allow ForceWithoutCrossSigning for all providers
2021-04-20 15:30:37 -05:00
hashicorp-ci
7398f36168
update bindata_assetfs.go 2021-04-15 18:15:02 +00:00
Kent 'picat' Gruber
dc937c9532 Merge pull request #10023 from hashicorp/fix-raw-kv-xss
Add content type headers to raw KV responses
2021-04-15 13:44:02 +00:00
Daniel Nephin
04d3575f11 Merge pull request #10025 from hashicorp/dnephin/fix-snapshot-auth-methods
snapshot: fix saving of auth methods
2021-04-14 21:19:24 +00:00
Matt Keeler
72aee1d8c4 Move static token resolution into the ACLResolver (#10013) 2021-04-14 16:40:12 +00:00
Freddy
7b88faca15 Merge pull request #9042 from lawliet89/tg-rewrite 2021-04-08 12:59:22 -06:00
Paul Banks
bb985743e9 cache: Fix bug where connection errors can cause early cache expiry (#9979)
Fixes a cache bug where TTL is not updated while a value isn't changing or cache entry is returning fetch errors.
2021-04-08 10:11:46 +00:00
Paul Banks
5587296464 Merge pull request #9977 from hashicorp/grpc-tuning
streaming: Grpc tuning
2021-04-08 10:10:22 +00:00
Paul Banks
78c1528c48 cache: fix bug where TTLs were ignored leading to leaked memory in client agents (#9978)
* Fix bug in cache where TTLs are effectively ignored

This mostly affects streaming since streaming will immediately return from Fetch calls when the state is Closed on eviction which causes the race condition every time.

However this also affects all other cache types if the fetch call happens to return between the eviction and then next time around the Get loop by any client.

There is a separate bug that allows cache items to be evicted even when there are active clients which is the trigger here.

* Add changelog entry

* Update .changelog/9978.txt
2021-04-08 10:09:29 +00:00
R.B. Boyer
8df30a4ded
[1.9.x] api: ensure v1/health/ingress/:service endpoint works properly when streaming is enabled (#9968)
Backport of #9967 to 1.9.x
2021-04-05 13:23:15 -05:00
Daniel Nephin
5e3825d9a7 Merge pull request #9923 from hashicorp/dnephin/fix-ui-config
http: fix a bug that would cause runtimeConfig to be cached
2021-03-25 16:29:01 +00:00
Hans Hasselberg
c2f56435bb introduce certopts (#9606)
* introduce cert opts

* it should be using the same signer

* lint and omit serial
2021-03-22 09:17:19 +00:00
Daniel Nephin
7e663ef039 Merge pull request #9851 from panascais-forks/fix-wan-ipv6-key
Fix advertise_addr_wan_ipv6 configuration key
2021-03-10 16:59:23 +00:00
Daniel Nephin
30b4dd1bcf Merge pull request #9683 from hashicorp/dnephin/fix-zombie-service-dereg
local: use agent token to deregister services
2021-03-05 21:47:24 +00:00
hashicorp-ci
b6e0d5827d
update bindata_assetfs.go 2021-03-04 19:24:42 +00:00
Daniel Nephin
a10ddedb1d Remove duplicate import 2021-03-02 14:34:19 -05:00
Daniel Nephin
dd0b307c8f Merge pull request #9188 from hashicorp/dnephin/more-streaming-tests
Add more streaming tests
2021-02-26 17:37:29 +00:00
John Cowen
ef3f6d5e3f ui: Remove any trailing fullstop/period DNS characters from Gateways UI API (#9752)
Previous to this commit, the API response would include Gateway
Addresses in the form `domain.name.:8080`, which due to the addition of
the port is probably not the expected response.

This commit rightTrims any `.` characters from the end of the domain
before formatting the address to include the port resulting in
`domain.name:8080`
2021-02-25 09:36:37 +00:00
R.B. Boyer
649aa884f2
test: omit envoy golden test files that differ from the latest version (#9823)
backport of #9807 to 1.9.x
2021-02-24 16:04:10 -06:00
R.B. Boyer
cbd3b98682 connect: if the token given to the vault provider returns no data avoid a panic (#9806)
Improves #9800
2021-02-22 20:09:21 +00:00
Daniel Nephin
4c2a861dda Merge pull request #9763 from hashicorp/dnephin/cache-warn-on-error-in-notify
cache: log a warning when Cache.Notify handles an error
2021-02-19 23:31:08 +00:00
R.B. Boyer
0fa96a2fa8 xds: only try to create an ipv6 expose checks listener if ipv6 is supported by the kernel (#9765)
Fixes #9311

This only fails if the kernel has ipv6 hard-disabled. It is not sufficient to merely not provide an ipv6 address for a network interface.
2021-02-19 20:39:21 +00:00
Daniel Nephin
5a8fc428bd Merge pull request #9772 from hashicorp/streamin-fix-bad-cached-snapshot
streaming: fix snapshot cache bug
2021-02-16 20:28:33 +00:00
Daniel Nephin
8db1a08fc9 Merge pull request #9758 from hashicorp/dnephin/fix-streaming-bugs
http: error if near is used with streaming
2021-02-12 15:38:33 +00:00
Chris Piraino
db8cc8624b Log replication warnings when no error suppression is defined (#9320)
* Log replication warnings when no error suppression is defined

* Add changelog file
2021-02-10 23:32:04 +00:00
R.B. Boyer
dd277b8ca8
connect: update supported envoy point releases to 1.16.2, 1.15.3, 1.14.6, 1.13.7 (#9737) (#9753) 2021-02-10 13:28:12 -06:00
Daniel Nephin
137374adb7 Merge pull request #9745 from hashicorp/dnephin/fix-streaming-bugs
streaming: fix a couple bugs
2021-02-09 23:31:23 +00:00
R.B. Boyer
1b01d6f9f8
connect: connect CA Roots in the primary datacenter should use a SigningKeyID derived from their local intermediate (#9428) (#9733)
1.9.x backport of #9428
2021-02-09 16:55:11 -06:00
Matt Keeler
975c196f7c Stop background refresh of cached data for requests that result in ACL not found errors (#9738) 2021-02-09 15:16:35 +00:00
Freddy
760c28a2df Avoid potential proxycfg/xDS deadlock using non-blocking send 2021-02-08 23:18:32 +00:00
R.B. Boyer
17effdeb28 xds: prevent LDS flaps in mesh gateways due to unstable datacenter lists (#9651)
Also fix a similar issue in Terminating Gateways that was masked by an overzealous test.
2021-02-08 16:20:32 +00:00