csi: set gRPC authority header for unix domain socket (#12359)
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` for example) may have more strictly conforming gRPC server libraries and we need to set the authority header manually.
This commit is contained in:
parent
1743648901
commit
5c91bc877c
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
csi: Fixed a bug where plugins written in NodeJS could fail to fingerprint
|
||||
```
|
|
@ -162,6 +162,7 @@ func newGrpcConn(addr string, logger hclog.Logger) (*grpc.ClientConn, error) {
|
|||
grpc.WithInsecure(),
|
||||
grpc.WithUnaryInterceptor(logging.UnaryClientInterceptor(logger)),
|
||||
grpc.WithStreamInterceptor(logging.StreamClientInterceptor(logger)),
|
||||
grpc.WithAuthority("localhost"),
|
||||
grpc.WithDialer(func(target string, timeout time.Duration) (net.Conn, error) {
|
||||
return net.DialTimeout("unix", target, timeout)
|
||||
}),
|
||||
|
|
Loading…
Reference in New Issue