Canonicalize migrate

This commit is contained in:
Alex Dadgar 2018-03-29 17:42:58 -07:00
parent 4766ea0490
commit dc03fab29b

View file

@ -3241,6 +3241,11 @@ func (tg *TaskGroup) Canonicalize(job *Job) {
tg.ReschedulePolicy = NewReschedulePolicy(job.Type) 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 // Set a default ephemeral disk object if the user has not requested for one
if tg.EphemeralDisk == nil { if tg.EphemeralDisk == nil {
tg.EphemeralDisk = DefaultEphemeralDisk() tg.EphemeralDisk = DefaultEphemeralDisk()