mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 23:37:01 +00:00
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.
This commit is contained in:
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
Block a user