From 338fd20bd273cb25afbb6b79ac74bebd5e63075f Mon Sep 17 00:00:00 2001 From: Tim Gross Date: Mon, 11 May 2020 12:26:10 -0400 Subject: [PATCH] csi: log fallthrough on invalid node IDs for client RPC (#7918) When a CSI client RPC is given a specific node for a controller but the lookup fails (because the node is gone or is an older version), we fallthrough to select a node from all those available. This adds logging to this case to aid in diagnostics. --- nomad/client_csi_endpoint.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nomad/client_csi_endpoint.go b/nomad/client_csi_endpoint.go index 4bb5a7ad9..eb0a4262a 100644 --- a/nomad/client_csi_endpoint.go +++ b/nomad/client_csi_endpoint.go @@ -134,6 +134,9 @@ func (a *ClientCSI) nodeForController(pluginID, nodeID string) (string, error) { _, err = getNodeForRpc(snap, nodeID) if err == nil { return nodeID, nil + } else { + // we'll fall-through and select a node at random + a.logger.Trace("%s could not be used for client RPC: %v", nodeID, err) } }