mirror of
https://github.com/kemko/nomad.git
synced 2026-01-08 19:35:41 +03:00
nomad/state/state_store: two cases of incorrect CSIPlugin in-place (#8630)
This commit is contained in:
@@ -1099,7 +1099,7 @@ func upsertNodeCSIPlugins(txn *memdb.Txn, node *structs.Node, index uint64) erro
|
||||
if raw == nil {
|
||||
break
|
||||
}
|
||||
plug := raw.(*structs.CSIPlugin)
|
||||
plug := raw.(*structs.CSIPlugin).Copy()
|
||||
|
||||
var hadDelete bool
|
||||
if _, ok := inUseController[plug.ID]; !ok {
|
||||
@@ -4740,6 +4740,7 @@ func (s *StateStore) updatePluginWithAlloc(index uint64, alloc *structs.Allocati
|
||||
// became healthy, just move on
|
||||
return nil
|
||||
}
|
||||
plug = plug.Copy()
|
||||
err = plug.DeleteAlloc(alloc.ID, alloc.NodeID)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user