mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
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:
3
.changelog/12359.txt
Normal file
3
.changelog/12359.txt
Normal file
@@ -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)
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user