Backport of CSI: set gRPC authority header for unix domain socket into release/1.2.x #12695
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport
This PR is auto-generated from #12359 to be assessed for backporting due to the inclusion of the label backport/1.2.x.
The below text is copied from the body of the original PR.
Fixes democratic-csi/democratic-csi#164
(See my commentary at democratic-csi/democratic-csi#164 (comment))
The go-grpc library used by most CSI plugins doesn't require the
authority header to be set, which violates the HTTP2 spec but doesn't
impact Nomad because both sides of the connection are using the same
library. But plugins written in other languages (
democratic-csi
forexample) may have more strictly conforming gRPC server libraries and
we need to set the authority header manually.
I've tested this out on both a NodeJS-based plugin (
democratic-csi
) anda golang-based plugin (
aws-ebs
)Note that this appears to have been fixed in grpc/grpc-go@a5a36bd
which we have in Nomad but in my testing this patch seems to be flawed.
You can't pass a target with a
unix://
prefix here and get a working connection,so the header isn't ever set. When I have some time I'll try to put together a
minimal repro and open an issue with upstream.