From dc03fab29be304a8567c596b92502ef32ce102dc Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Thu, 29 Mar 2018 17:42:58 -0700 Subject: [PATCH] Canonicalize migrate --- nomad/structs/structs.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index c8632691c..328ff86a1 100644 --- a/nomad/structs/structs.go +++ b/nomad/structs/structs.go @@ -3241,6 +3241,11 @@ func (tg *TaskGroup) Canonicalize(job *Job) { tg.ReschedulePolicy = NewReschedulePolicy(job.Type) } + // Canonicalize Migrate for service jobs + if job.Type == JobTypeService && tg.Migrate == nil { + tg.Migrate = DefaultMigrateStrategy() + } + // Set a default ephemeral disk object if the user has not requested for one if tg.EphemeralDisk == nil { tg.EphemeralDisk = DefaultEphemeralDisk()