Freddy
920ba3db39
Merge pull request #9976 from hashicorp/centralized-upstream-fixups
2021-04-08 12:26:56 -06:00
Freddy
38819dac1f
Merge pull request #9042 from lawliet89/tg-rewrite
2021-04-08 11:49:23 -06:00
freddygv
0d0205e0dc
PR comments
2021-04-08 11:16:03 -06:00
Daniel Nephin
93818ebc5a
Merge pull request #9950 from hashicorp/dnephin/state-use-txn-everywhere
...
state: use Txn interface everywhere
2021-04-08 12:02:03 -04:00
Daniel Nephin
9db8ffb1c5
Merge pull request #9880 from hashicorp/dnephin/catalog-events-test-pattern
...
state: use runCase pattern for large test
2021-04-08 11:54:41 -04:00
Paul Banks
ae5c0aad39
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 11:11:15 +01:00
Paul Banks
b61e00b772
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 11:08:56 +01:00
Paul Banks
9115884c50
Merge pull request #9977 from hashicorp/grpc-tuning
...
streaming: Grpc tuning
2021-04-08 11:05:38 +01:00
freddygv
43091aae60
Avoid sending zero-value upstream defaults from api
2021-04-07 15:03:42 -06:00
freddygv
cc4933ea0e
Revert "Avoid accumulating synthetic upstreams"
...
This reverts commit 86672df4fad094cd7e044bf4db168162594517c2.
2021-04-07 14:30:30 -06:00
hashicorp-ci
014547159c
auto-updated agent/uiserver/bindata_assetfs.go from commit a0d12ff16
2021-04-07 16:48:59 +00:00
freddygv
7698be3636
Avoid accumulating synthetic upstreams
...
Synthetic upstreams from service-defaults config are stored locally in
the Upstreams list. Since these come from service-defaults they should
be cleaned up locally when no longer present in the service config
response.
2021-04-07 09:32:48 -06:00
freddygv
ddc6c9b7ca
Ensure mesh gateway mode override is set for upstreams for intentions
2021-04-07 09:32:48 -06:00
freddygv
619dc5ede4
Finish resolving upstream defaults in proxycfg
2021-04-07 09:32:48 -06:00
freddygv
a1fd3b0271
Pass down upstream defaults to client proxies
...
This is needed in case the client proxy is in TransparentProxy mode.
Typically they won't have explicit configuration for every upstream, so
this ensures the settings can be applied to all of them when generating
xDS config.
2021-04-07 09:32:47 -06:00
freddygv
042753fc26
Prevent wildcard destinations for proxies and upstreams
2021-04-07 09:32:47 -06:00
freddygv
c2e74e21bc
Prevent requests without UpstreamIDs from being flagged as legacy.
...
New clients in transparent proxy mode can send requests for service
config resolution without any upstream args because they do not have
explicitly defined upstreams.
Old clients on the other hand will never send requests without the
Upstreams args unless they don't have upstreams, in which case we do not
send back upstream config.
2021-04-07 09:32:47 -06:00
freddygv
d19151f162
Fixup doc phrasing
2021-04-07 09:32:47 -06:00
freddygv
8566495f4f
Prevent synthetic upstreams without addresses from failing duplicate ip/port validation
2021-04-07 09:32:47 -06:00
Paul Banks
571324ad08
Tune streaming backoff on errors to retry a bit faster when TCP connections drop
2021-04-07 14:13:30 +01:00
Paul Banks
f4257f91f6
Set gRPC keepalives to mirror Yamux keepalive behaviour
2021-04-07 14:09:22 +01:00
R.B. Boyer
df538b9bdc
missed build tag on this file ( #9974 )
2021-04-06 13:24:11 -05:00
R.B. Boyer
82245585c6
connect: add toggle to globally disable wildcard outbound network access when transparent proxy is enabled ( #9973 )
...
This adds a new config entry kind "cluster" with a single special name "cluster" where this can be controlled.
2021-04-06 13:19:59 -05:00
Daniel Nephin
a711e119e7
Merge pull request #9958 from hashicorp/dnephin/state-improve-indexer-tests
...
state: support additional test cases in indexer tests
2021-04-06 11:55:24 -04:00
Yong Wen Chua
85aa7f2785
Merge branch 'master' of github.com:hashicorp/consul into tg-rewrite
2021-04-06 17:05:26 +08:00
R.B. Boyer
af78561018
api: ensure v1/health/ingress/:service endpoint works properly when streaming is enabled ( #9967 )
...
The streaming cache type for service health has no way to handle v1/health/ingress/:service queries as there is no equivalent topic that would return the appropriate data.
Ensure that attempts to use this endpoint will use the old cache-type for now so that they return appropriate data when streaming is enabled.
2021-04-05 13:23:00 -05:00
Daniel Nephin
f0590e7c18
state: support additional test cases in indexer tests
...
And add a few additional cases.
2021-03-31 14:39:33 -04:00
Kyle Havlovitz
3cdd495600
Backport enterprise changes to prevent merge conflicts
...
Co-Authored-By: Kyle Havlovitz <kylehav@gmail.com>
2021-03-31 14:05:26 -04:00
Daniel Nephin
de16417be1
Merge pull request #9949 from hashicorp/dnephin/state-index-checks
...
state: convert remaining checks table indexers to functional pattern
2021-03-31 11:53:21 -04:00
Daniel Nephin
3477e70c11
Merge pull request #9948 from hashicorp/dnephin/state-index-service
...
state: convert remaining services table indexers to functions
2021-03-31 11:49:21 -04:00
Daniel Nephin
3df239b036
Merge pull request #9947 from hashicorp/dnephin/state-ent-index-3
...
state: move indexer functions out of oss files
2021-03-31 11:45:26 -04:00
hashicorp-ci
68c91b535b
auto-updated agent/uiserver/bindata_assetfs.go from commit ee5c3e3aa
2021-03-31 15:00:21 +00:00
Daniel Nephin
e4a60a2a8d
state: use tableIndex constant
2021-03-29 18:52:20 -04:00
Daniel Nephin
7cb2255838
state: use ReadTxn and WriteTxn interface
...
Instead of *txn, so that we can replace the txn implementation with others, and so
that the function is easily documented as a read or write function.
2021-03-29 18:52:16 -04:00
Daniel Nephin
eded4dfc78
Merge pull request #9932 from hashicorp/dnephin/use-ent-meta-default
...
Set default enterprise meta in test case
2021-03-29 18:44:39 -04:00
Daniel Nephin
d785c86db1
state: convert checks.service index to new pattern
2021-03-29 16:38:53 -04:00
Daniel Nephin
f859ba6d4b
state: convert checks.status indexer
...
As part of this change the indexer will now be case insensitive by using
the lower case value. This should be safe because previously we always
had lower case strings.
This change was made out of convenience. All the other indexers use
lowercase, so we can re-use the indexFromQuery function by using
lowercase here as well.
2021-03-29 16:38:50 -04:00
Daniel Nephin
9251ac881a
state: add tests for checks indexers
2021-03-29 16:38:47 -04:00
Daniel Nephin
98d6dcbdf8
state: use constants for table checks
2021-03-29 16:38:43 -04:00
Daniel Nephin
bcbdc9cab3
state: pass Query in from caller
...
To reduce the number of arguments
2021-03-29 15:42:30 -04:00
Daniel Nephin
372d274b34
state: convert services.kind to functional indexer pattern
2021-03-29 15:42:30 -04:00
Daniel Nephin
bcde8d2fad
state: add tests for services.kind indexer
2021-03-29 15:42:27 -04:00
Daniel Nephin
9f9eadd569
state: convert services table service and connect indexer
...
To the new functional indexer pattern
2021-03-29 15:42:24 -04:00
Daniel Nephin
11311c1fcc
state: add tests for services table service and connect indexers
2021-03-29 15:42:22 -04:00
Daniel Nephin
9a3daf3100
state: use constant for tableServices
2021-03-29 15:42:18 -04:00
Daniel Nephin
ec04df66bd
state: remove duplication of Query indexer
2021-03-29 14:35:11 -04:00
Daniel Nephin
28866e48ad
state: remove duplication in acl tables schema
2021-03-29 14:21:27 -04:00
Daniel Nephin
c6a1ca701d
state: reduce duplication in catalog table schema
2021-03-29 14:21:23 -04:00
Daniel Nephin
d9dacb8388
state: share more indexer functions for config_entries
2021-03-29 14:21:20 -04:00
Daniel Nephin
f303120f2d
state: remove old schema test
...
This test has been replaced by TestNewDBSchema_Indexers
2021-03-29 14:21:13 -04:00