Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DirectPath Misconfiguration emitted for incorrect Credentials but DirectPath still works #2423

Closed
frankyn opened this issue Jan 26, 2024 · 2 comments · Fixed by #2430
Closed
Assignees
Labels
priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@frankyn
Copy link
Member

frankyn commented Jan 26, 2024

Environment details

  1. GCE
  2. artifact version(s): google-cloud-storage:2.32.1, gax 2.41.0

Issue

Run the following code in GCE with DirectPath enabled causes the following warning to be logged.

InstantiatingGrpcChannelProvider logDirectPathMisconfig
WARNING: DirectPath is misconfigured. Please make sure the credential is an instance of com.google.auth.oauth2.ComputeEngineCredentials .

Code example

RetrySettings retrySettings = StorageOptions.getDefaultRetrySettings().toBuilder().build();
StorageOptions retryStorageOptions =
    StorageOptions.grpc().setRetrySettings(retrySettings).setAttemptDirectPath(true).build();
Storage storageClient = retryStorageOptions.getService();
@frankyn frankyn added the priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. label Jan 26, 2024
@frankyn
Copy link
Member Author

frankyn commented Jan 26, 2024

Bumping priority per Blake's ask. This needs to be fixed as customers using java-storage will be confused when they attempt using DirectPath and they're told it's misconfigured.

@blakeli0 blakeli0 added the type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. label Jan 26, 2024
@frankyn
Copy link
Member Author

frankyn commented Jan 27, 2024

Hey @arunkumarchacko, looks like there's a bug in the warnings emitted when using DirectPath; it's being addressed but want to give you a heads up.

@blakeli0 blakeli0 self-assigned this Jan 27, 2024
gcf-merge-on-green bot pushed a commit that referenced this issue Jan 31, 2024
…st channel (#2430)

Fixes #2423 
The root cause of the issue is that `logDirectPathMisconfig()` is called in the builder of `InstantiatingGrpcChannelProvider`, which could be called multiple times before it is fully instantiated. We should only call `logDirectPathMisconfig()` right before `createChannel()` which creates the first channel. 

We can not move it to before `createSingleChannel()` because it is used for resizing channel regularly after a client is initialized, and we only want to log direct path misconfiguration once.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
2 participants