-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retry OOM killed jobs #4
Draft
cmelone
wants to merge
12
commits into
develop
Choose a base branch
from
add/handle-oom
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmelone
force-pushed
the
add/handle-oom
branch
from
September 16, 2024 23:55
5a3ede8
to
d9b67c8
Compare
@alecbcs the pipeline webhook aspect of this PR is ready for review. This first step essentially detects OOM killed jobs and inserts them into the db. Like I mentioned in the kitware channel, OOM detection is broken atm, so I will update the |
- if pipeline failed, check if any of the jobs failed due to OOM - insert OOM jobs into database for prediction step
…alled by a pipeline
If a job is over the defined retry limit, we won't mark it as needing to be retried. However, because we are handling this on a pipeline level, if another job in the pipeline was OOMed but not over the retry limit the pipeline will still be retried, leading to some idiosyncrasies.
cmelone
force-pushed
the
add/handle-oom
branch
from
October 29, 2024 15:23
29a26db
to
1b2ba20
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Automatically retries jobs if they are OOM killed after gantry underallocates memory.
As discussed in #74, we would prefer to restart jobs directly by supplying new variables, but this feature is not supported by gitlab. When a new pipeline is created for a ref, successful builds in the previous pipeline will be pruned in the generate/concretization step, minimizing wasted cycles.
During the generate step, gantry will receive a request for resource allocations for a job that was recently OOM killed. The program will look for an exact spec match in the database and return these modified variables:
KUBERNETES_MEMORY_LIMIT * 0.2
-- bump the past request by 20%GANTRY_RETRY_COUNT +=1
-- maintain a count of how many times this spec has been retriedGANTRY_RETRY_ID
-- gitlab id for the original job to link between retries...not sure if necessaryTo ensure we don't fall into an infinite loop of increasing memory limits, gantry will not bump the limit if the retry count will exceed three. Additionally, it will not restart a pipeline if all OOM killed jobs also exceed the retry limit. This means we are allowing certain jobs to fail. If we investigate and it seems like an increase is warranted, how do we ensure that this gets communicated to gantry?
New optional columns in the jobs table:
oomed
-- failed job OOM killedretry_count
-- number of times the job has been retriedTODO:
Questions: