nomad/state/state_store: handle type conversion failure explicitly (#8660)

This commit is contained in:
Lang Martin
2020-08-12 17:53:12 -04:00
committed by GitHub
parent 307b7b7449
commit 956c3a426d

View File

@@ -1099,7 +1099,11 @@ func upsertNodeCSIPlugins(txn *memdb.Txn, node *structs.Node, index uint64) erro
if raw == nil {
break
}
plug := raw.(*structs.CSIPlugin).Copy()
plug, ok := raw.(*structs.CSIPlugin)
if !ok {
continue
}
plug = plug.Copy()
var hadDelete bool
if _, ok := inUseController[plug.ID]; !ok {