Skip to content

Commit

Permalink
fix: disable job migrations and reschedules (#1017)
Browse files Browse the repository at this point in the history
<!-- Please make sure there is an issue that this PR is correlated to. -->
Fixes RVT-3774
## Changes

<!-- If there are frontend changes, please include screenshots. -->
  • Loading branch information
MasterPtato committed Aug 2, 2024
1 parent 9f377ba commit 91e869d
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 0 deletions.
10 changes: 10 additions & 0 deletions svc/pkg/ds/ops/server-create/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,16 @@ pub async fn handle(
]),
..TaskGroup::new()
}]),
// Disables migrating in the event of a node drain
migrate: Some(Box::new(MigrateStrategy {
max_parallel: Some(0),
..MigrateStrategy::new()
})),
// Disables rescheduling in the event of a node drain
reschedule: Some(Box::new(ReschedulePolicy {
attempts: Some(0),
..ReschedulePolicy::new()
})),
..Job::new()
};

Expand Down
10 changes: 10 additions & 0 deletions svc/pkg/faker/ops/job-template/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ fn gen_job(
tasks: Some(vec![task]),
..TaskGroup::new()
}]),
// Disables migrating in the event of a node drain
migrate: Some(Box::new(MigrateStrategy {
max_parallel: Some(0),
..MigrateStrategy::new()
})),
// Disables rescheduling in the event of a node drain
reschedule: Some(Box::new(ReschedulePolicy {
attempts: Some(0),
..ReschedulePolicy::new()
})),
..Job::new()
})
}
Expand Down
10 changes: 10 additions & 0 deletions svc/pkg/job-run/worker/src/workers/create/create_job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,16 @@ mod tests {
}]),
..TaskGroup::new()
}]),
// Disables migrating in the event of a node drain
migrate: Some(Box::new(MigrateStrategy {
max_parallel: Some(0),
..MigrateStrategy::new()
})),
// Disables rescheduling in the event of a node drain
reschedule: Some(Box::new(ReschedulePolicy {
attempts: Some(0),
..ReschedulePolicy::new()
})),
..Job::new()
}
}
Expand Down
10 changes: 10 additions & 0 deletions svc/pkg/mm-config/ops/version-prepare/src/prewarm_ats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,16 @@ fn gen_prewarm_job(artifact_count: usize) -> GlobalResult<nomad_client::models::
}]),
..TaskGroup::new()
}]),
// Disables migrating in the event of a node drain
migrate: Some(Box::new(MigrateStrategy {
max_parallel: Some(0),
..MigrateStrategy::new()
})),
// Disables rescheduling in the event of a node drain
reschedule: Some(Box::new(ReschedulePolicy {
attempts: Some(0),
..ReschedulePolicy::new()
})),
..Job::new()
})
}
10 changes: 10 additions & 0 deletions svc/pkg/mm/worker/src/workers/lobby_create/nomad_job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,16 @@ pub fn gen_lobby_docker_job(
]),
..TaskGroup::new()
}]),
// Disables migrating in the event of a node drain
migrate: Some(Box::new(MigrateStrategy {
max_parallel: Some(0),
..MigrateStrategy::new()
})),
// Disables rescheduling in the event of a node drain
reschedule: Some(Box::new(ReschedulePolicy {
attempts: Some(0),
..ReschedulePolicy::new()
})),
..Job::new()
})
}
Expand Down

0 comments on commit 91e869d

Please sign in to comment.