From bf67737f56e0bf6f528a4fbe7a4553b236f3f063 Mon Sep 17 00:00:00 2001 From: Tim Gross Date: Mon, 10 Aug 2020 11:02:01 -0400 Subject: [PATCH] csi: missing plugins during node delete are not an error (#8619) When deregistering a client, CSI plugins running on that client may not get a chance to fingerprint before being stopped. Account for the case where a plugin allocation is the last instance of the plugin and has been deleted from the state store to avoid errors during node deregistration. --- nomad/state/state_store.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nomad/state/state_store.go b/nomad/state/state_store.go index 9f6ae6c14..3c4196c3d 100644 --- a/nomad/state/state_store.go +++ b/nomad/state/state_store.go @@ -1158,7 +1158,9 @@ func deleteNodeCSIPlugins(txn *memdb.Txn, node *structs.Node, index uint64) erro return fmt.Errorf("csi_plugins lookup error %s: %v", id, err) } if raw == nil { - return fmt.Errorf("csi_plugins missing plugin %s", id) + // plugin may have been deregistered but we didn't + // update the fingerprint yet + continue } plug := raw.(*structs.CSIPlugin).Copy()