From 4f36d4b308a278bdf920ce17ba0aa9343cf6cf0c Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Fri, 10 Jan 2020 10:41:12 -0500 Subject: [PATCH] canonicalize allocs from plan results too --- nomad/state/state_store.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nomad/state/state_store.go b/nomad/state/state_store.go index 9d915536d..1590a3fee 100644 --- a/nomad/state/state_store.go +++ b/nomad/state/state_store.go @@ -294,6 +294,11 @@ func (s *StateStore) UpsertPlanResults(index uint64, results *structs.ApplyPlanR allocsToUpsert = append(allocsToUpsert, results.AllocsUpdated...) allocsToUpsert = append(allocsToUpsert, allocsPreempted...) + // handle upgrade path + for _, alloc := range allocsToUpsert { + alloc.Canonicalize() + } + if err := s.upsertAllocsImpl(index, allocsToUpsert, txn); err != nil { return err }