Canonicalize migrate

This commit is contained in:
Alex Dadgar 2018-03-29 17:42:58 -07:00
parent 4766ea0490
commit dc03fab29b
1 changed files with 5 additions and 0 deletions

View File

@ -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()