-
Notifications
You must be signed in to change notification settings - Fork 674
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
fix: suspend job status can not turn into Suspended and report error… #2159
Open
xuxianzhang
wants to merge
1
commit into
kubeflow:master
Choose a base branch
from
xuxianzhang:master
base: master
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.
+5
−2
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This attempts to clean up the resource without making any judgment, but since the completion time of the suspended state task is nil, it will always block, resulting in the task state always Running, which will cause logic exceptions for other controllers that rely on kubeflowJob, such as in kueue, where tasks are scheduled according to a priority policy. When a low-priority task is evicated due to the enqueue of a high-priority task, the task's runPolicy.Suspend is true, but its state is still Running. As a result, kueue cannot reclaim the resources of the evicated task
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for creating this @xuxianzhang!
Isn't the
CleanupJob
flow will be trigger only when TTLSecondsAfterFinished is set ?training-operator/pkg/controller.v1/common/job.go
Line 428 in ec888fb
Why state is Running after Job has been suspended ? It should convert Job to the Suspended condition according to this:
training-operator/pkg/controller.v1/common/job.go
Line 159 in ec888fb
@alculquicondor @tenzen-y Do we know how the cleanup looks like for MPIJob ? It looks that for MPI, we only set the TTL seconds for launcher Job:
https://github.com/kubeflow/mpi-operator/blob/52cda2c7e85ac22284ea23e1d905c4e2eaefdc11/pkg/controller/mpi_job_controller.go#L1478C51-L1478C74
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when job's runPolicy.Suspend turn into true, IsJobSuspended return true and tigger CleanUpResources,but it will return an error because job isn't finished. And never reachL159.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
training-operator/pkg/controller.v1/common/job.go
Lines 146 to 173 in ec888fb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, we need CleanUpResources return nil when job is suspend,and tigger UpdateJobConditions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the preconditions are TTLSecondsAfterFinished is set
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it return this error ?
training-operator/pkg/controller.v1/common/job.go
Lines 431 to 433 in ec888fb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes