Skip to content

Commit

Permalink
csi: set gRPC authority header for unix domain socket
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tgross committed Mar 23, 2022
1 parent 876e816 commit 0fe621d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/12359.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
csi: Fixed a bug where plugins written in NodeJS could fail to fingerprint
```
1 change: 1 addition & 0 deletions plugins/csi/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}),
Expand Down

0 comments on commit 0fe621d

Please sign in to comment.