Commit Graph

5527 Commits

Author SHA1 Message Date
Terry Wilson db05295fde
core: Enable outlier detection unit test (#9493)
Implements a fake load balancer with round robin like behavior in order
to test an outlier detection scenario where a subchannel goes from
having multiple associated addresses to one.
2022-08-29 15:23:41 -07:00
sanjaypujare 6131a85196
census,observability: suppress message-events in traces when used by observability (#9485) 2022-08-26 16:39:54 -07:00
yifeizhuang 96b9fc1be4 fix 2022-08-25 12:53:11 -07:00
yifeizhuang 221ee494d9 move max connection idle manager to core 2022-08-25 12:53:11 -07:00
Terry Wilson d3331d953d
core: outlier detection max ejection logic update (#9492)
Stop further ejection if the ejection percentage is lesser than or equal
to the maximum ejection percentage. Previously this was only done when
the current ejection percentage was lesser than the maximum.
2022-08-25 10:48:28 -07:00
Terry Wilson 70bc7470c6
core: outlier detection to min host request volume (#9490)
When doing the failure percentage algorithm, ejections should be skipped
if there are not enough addresses that meet the minimum volume
requirement.
2022-08-24 15:49:01 -07:00
Terry Wilson a74f82ac26
core: Update outlier detection max ejection logic. (#9489)
Instead of strictly enforcing the max ejection percentage setting,
allow one additional ejection past the maximum. This quarantees at least
one ejection and matches Envoy proxy behavior.
2022-08-24 14:44:28 -07:00
Terry Wilson bd33af2dde
Update README etc to reference 1.49.0 (#9487) 2022-08-24 12:11:08 -07:00
Sergii Tkachenko 0cf2d8bc48
context: Skip storageReturnsNullTest for JDK >= 11 (#9484)
JDK-8210522 changes the behaviour of Java reflection to filter out
security-sensitive fields in the java.lang.reflect.Field. This
prohibits Field.class.getDeclaredFields("modifiers") call we rely on
in this test. Until we have a good solution for setting a custom
storage for testing purposes, we'll have to skip this test
for JDK >= 11. Ref https://bugs.openjdk.org/browse/JDK-8210522
2022-08-24 10:17:12 -07:00
Sergii Tkachenko e1ddc3553f
example-android: Add android:exported="true" tag (#9482)
Add android:exported="true" tag to activities/services/receivers that specify an intent filter.

Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. Future versions of the manifest merger, as well as the Android platform and the Playstore enforce this.
2022-08-23 14:56:03 -07:00
Eric Anderson 95508e19df binder: Exclude internal classes from javadoc 2022-08-23 11:42:25 -07:00
Terry Wilson d4cd926c96
core: Enable outlier detection by default. (#9479) 2022-08-23 11:32:10 -07:00
Terry Wilson 1dd764a3a1
buildscripts: Add outlier_detection_test interop test. (#9461) 2022-08-22 14:27:20 -07:00
Terry Wilson b16e0e34a4
core: [outlier detection] eject/uneject states to delegate listener. (#9469) 2022-08-22 11:34:50 -07:00
Terry Wilson fbefdf5ea7
core: [outlier detection] Get addresses from subchannel args. (#9468) 2022-08-22 11:12:51 -07:00
Terry Wilson f5670b39c4
core: OutlierDetectionLoadBalancer to pass child LB config. (#9467) 2022-08-22 10:29:57 -07:00
Terry Wilson 9ed5a1bbbf
xds: Fix outlier detection env flag name. (#9462) 2022-08-21 16:13:31 -07:00
DNVindhya 20ab369f3a
gcp-observability: update configuration variable to enable cloud tracing (#9463) 2022-08-19 17:09:17 -07:00
Eric Anderson 2a364838be googleapis: Stabilize google-c2p resolver
Preserve google-c2p-experimental support for the moment to ease testing
migration.
2022-08-19 13:38:27 -07:00
Larry Safran b66250e9e5
Rls spec sync (#9437)
rls: Update implementation to match spec.

* Cleanup cache if exceeds max size when add an entry. Make cache entry size calculations more accurate
* Trigger pending RPC processing if unexpired backoff entries were removed from the cache by triggering helper to call it's parent updateBalancingState with the same state and picker
* Introduce minimum time before eviction (5 seconds)
* Change default accept ratio for AdaptiveThrottler from 1.2 -> 2.0
* Configuration validation
* When checking key names for duplicates also look at headers
* Check extra keys for duplicates

See analysis of implementation versus spec at https://docs.google.com/spreadsheets/d/18w5s1TEebRumWzk1pvWnjiHFGKc6MW-vt8tRLY4eNs0/
2022-08-19 13:31:05 -07:00
Eric Anderson 618a4de705
xds: CHANNEL_ID hash should be random for the channel
The log id is an incrementing value starting from 0. That means the same
binary on two different machines will have the same hashes for each
consecutive Channel. That was not at all the intension of CHANNEL_ID.
From gRFC A42:

> This can be used in similar situations to where Envoy uses
> connection_properties to hash on the source IP address.
2022-08-18 17:27:15 -07:00
Terry Wilson 81abb21e7f
xds: Configure outlier detection. (#9456)
Enables the new OutlierDetectionLoadBalancer when outlier detection is enabled
in the xDS cluster configuration.
2022-08-18 16:06:17 -07:00
Terry Wilson 128688ae4d
Outlier detection load balancer (#9447)
New outlier detection load balancer.

Tracks all RPC results to the addresses it is configured with and periodically attempts
to detect outlier. It wraps a child load balancer from which it hides any addresses that
are deemed outliers.

As specified in gRFC A50: gRPC xDS Outlier Detection Support:
https://github.com/grpc/proposal/blob/master/A50-xds-outlier-detection.md
2022-08-18 08:46:30 -07:00
Larry Safran 778098b911
rls: fix RLS policy to not propagate status from control plane RPC to data plane RPC (#9413)
rls: Avoid library returning the status codes which the status spec document says that the library will never return when talking to RLS server.  Instead, always return UNAVAILABLE on errors.

* Provide context around error message from RLS server
2022-08-15 11:10:10 -07:00
Larry Safran 01d5bd47cb
Cleanup some of the warnings across the code base (#9445)
No logic changes, just cleans up warnings to make spotting real problems easier.

Remove "public" declarations on interfaces
Remove duplicate semicolons (Java lines ending in ";;")
Remove unneeded import
Change non-javadoc comment to not start with "/**"
Remove unneeded explicit type declarations from generics
Fix broken javadoc links
2022-08-15 11:06:31 -07:00
DNVindhya 03430c786a
remove unregistering stackdriver exporters (#9442) 2022-08-12 12:20:43 -07:00
sai-sunder-s 7169b174e6
auth: Copy quota project id when creating Self Signed JWT creds from Service Account Creds (#9438) 2022-08-11 13:20:51 -07:00
sanjaypujare 91aada316a
gcp-observability: implement exclusion of cloud backend RPCs for all 3 signals (#9427)
* gcp-observability: implement exclusion of cloud backend RPCs for all 3 signals
by using a ConditionalClientInterceptor that conditionally delegates
2022-08-10 14:19:27 -07:00
Eric Anderson 61f19d707a
Swap Animalsniffer to Java 8 and Android 19
Also added missing signatures. Swapping to version catalog will make
this process easier in the future.
2022-08-10 12:41:57 -07:00
Eric Anderson 2b50e405b1 core: Remove LB refreshNameResolver check
It's been 17 months since the check was introduced, which is plenty for
the migration. Leaving ignoreRefreshNameResolutionCheck() in-place to
let users delete their call sites. We'll remove the method after a few
releases.

Fixes #9409
2022-08-10 10:26:15 -07:00
Terry Wilson 01aff58178
Start 1.50.0 development cycle (#9433) 2022-08-10 08:17:59 -07:00
DNVindhya 7bdca0c0ef
gcp-observability: remove logging channel/server providers (#9424) 2022-08-09 21:08:01 -07:00
yifeizhuang 050cdb14fe Update README etc to reference 1.48.1 2022-08-02 15:47:29 -07:00
Eric Anderson db320cefc1
repositories.bzl: Use valid target name for services/xds
This fixes builds including dependencies from Maven that use
io.grpc:grpc-services or io.grpc:grpc-xds. It resolves this error:
```
no such target '@io_grpc_grpc_java//services:services': target 'services' not declared in package 'services' defined by services/BUILD.bazel and referenced by '@maven//:io_grpc_grpc_services'
```

Fixes #9419
2022-08-02 10:28:44 -07:00
Sergii Tkachenko e26b6ee1d7
xds: Refactor and document `ClientXdsClient.handleResourceUpdate()` (#9377)
- Reduce nesting level by using `continue`
- Rearrange the order when it's possible to bail out early
- Add comments explaining what case it is, and the logic behind it
2022-07-29 16:55:27 -07:00
Terry Wilson 7665d3850b
Revert "Add LoadBalancer.acceptResolvedAddresses() (#8742)" (#9414)
This reverts commit 70a29fbfe3.
2022-07-28 12:15:26 -07:00
sanjaypujare e3d5861273
istio-interop-testing: add logic to forward non-grpc requests to the Go echo server (#9385) 2022-07-27 14:31:33 +05:30
Terry Wilson 70a29fbfe3
Add LoadBalancer.acceptResolvedAddresses() (#8742)
Introduces a new acceptResolvedAddresses() to the LoadBalancer.

This will now be the preferred way to handle addresses from the NameResolver. The existing handleResolvedAddresses() will eventually be deprecated.

The new method returns a boolean based on the LoadBalancers ability to use the provided addresses. If it does not accept them, false is returned. LoadBalancer implementations using the new method should no longer implement the canHandleEmptyAddressListFromNameResolution(), which will eventually be removed, along with handleResolvedAddresses().

Backward compatibility will be maintained so existing load balancers using handleResolvedAddresses() will continue to work.

Additionally the previously deprecated handleResolvedAddressGroups() method is removed.
2022-07-26 09:23:37 -07:00
sanjaypujare e89d43dde6
gcp-observability: add custom tags to metrics and traces using Stackdriver config-builders (#9407) 2022-07-26 21:27:46 +05:30
yifeizhuang cc9505f6bc
example-orca: fix lost streamTracerFactor (#9411) 2022-07-25 16:28:58 -07:00
yifeizhuang 5f1a1d4f35
service: CalMetricRecorder.recordCallMetric is deprecated, use CalMetricRecorder.recordRequestCostMetric (#9410) 2022-07-25 13:10:29 -07:00
sanjaypujare 1fe3ed9b53
xds: use predefined XdsLbPolicies constants instead of string literals for consistency (#9408) 2022-07-25 22:35:08 +05:30
sanjaypujare 10979b2e2c
gcp-observability: add custom tags for all 3 - metrics, logging, traces and remove old env-vars impl (#9402)
* gcp-observability: add custom tags for all 3 - metrics, logging, traces and remove old env-vars impl
2022-07-23 01:32:18 +05:30
yifeizhuang 027d36eee7
xds: xdsNameResolver match channel overrideAuthority in virtualHost matching (#9405) 2022-07-22 12:41:16 -07:00
yifeizhuang 58cd6e1a7f
example: fix orca example to use new ORCA API (#9403) 2022-07-22 07:40:49 -07:00
Terry Wilson 4850ad219e
xds: ClusterManager LB state/picker update fix (#9404)
* xds: ClusterManager LB state/picker update fix

Correctly set the currentState and curentPicker when the
child LB updates balancing state
2022-07-21 13:54:40 -07:00
Larry Safran dcac7689fa
rls: Change AdaptiveThrottler to use Ticker instead of TimeProvider (#9390)
rls: Change AdaptiveThrottler to use Ticker instead of TimeProvider
* Use a slot being null to mark invalid rather than relying on the slot's endNanos value.

Fixes #9048
2022-07-21 11:41:02 -07:00
Larry Safran 50cdfa9f05
rls: Only use subchannel policy for default target when RLS is not available (#9383)
* core: Only use subchannel policy for default target when RLS is not available
Fixes #9237
2022-07-20 17:20:19 -07:00
yifeizhuang 03abe8a088
Update README etc to reference 1.48.0 (#9401) 2022-07-20 15:36:22 -07:00
Larry Safran 98ce51ab5c
rls: Support multiple returned targets from RLS Server (#9374)
* rls: Support multiple returned targets from RLS Server
Pick the first target that is not in TRANSIENT_FAILURE state.  If none, use the first target.
Also initialize all targets returned from RLS so DataCache will contain a list of child policy wrappers.

Fixes #9236
2022-07-20 11:11:19 -07:00