Skip to content

Commit

Permalink
csi: missing plugins during node delete are not an error (#8619)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tgross committed Aug 10, 2020
1 parent 7dd307d commit bf67737
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nomad/state/state_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit bf67737

Please sign in to comment.