mirror of https://github.com/k3s-io/k3s
Return error from NodeGetInfo
This PR checks if NodeGetInfo returns error. If so, it returns the error. Without this change, it always returns no error (nil) regardless of whether NodeGetInfo returns error.pull/58/head
parent
5e5f7e5389
commit
0a14086792
|
@ -95,6 +95,10 @@ func (c *csiDriverClient) NodeGetInfo(ctx context.Context) (
|
|||
nodeClient := csipb.NewNodeClient(conn)
|
||||
|
||||
res, err := nodeClient.NodeGetInfo(ctx, &csipb.NodeGetInfoRequest{})
|
||||
if err != nil {
|
||||
return "", 0, nil, err
|
||||
}
|
||||
|
||||
return res.GetNodeId(), res.GetMaxVolumesPerNode(), res.GetAccessibleTopology(), nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue