diff --git a/nomad/core_sched.go b/nomad/core_sched.go index 85659118ae1c..1ac135d0aaea 100644 --- a/nomad/core_sched.go +++ b/nomad/core_sched.go @@ -860,7 +860,7 @@ func (c *CoreScheduler) csiPluginGC(eval *structs.Evaluation) error { }} err := c.srv.RPC("CSIPlugin.Delete", req, &structs.CSIPluginDeleteResponse{}) if err != nil { - if err.Error() == "plugin in use" { + if strings.Contains(err.Error(), "plugin in use") { continue } c.logger.Error("failed to GC plugin", "plugin_id", plugin.ID, "error", err)