Skip to content
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

Making executor mark pods that are unrecoverably stuck sooner #617

Merged
merged 3 commits into from
Jun 30, 2021

Conversation

JamesMurkin
Copy link
Contributor

Currently if a pod is submitted with something that causes it to get "stuck" (i.e stay in Pending but Kubernetes doesn't consider it a failure), users must with the full stuckPodExpiry before Armada does anything about it.

However some reasons pods get stuck are never going to recover (invalid mount path, invalid image name etc).

Now the executor will try to spot these unrecoverable situations and return this error back to the user sooner, rather than waiting the whole stuckPodExpiry.

Currently if a pod is submitted with something that causes it to get "stuck" (i.e stay in Pending but Kubernetes doesn't consider it a failure), users must with the full stuckPodExpiry before Armada does anything about it.

However some reasons pods get stuck are never going to recover (invalid mount path, invalid image name etc).

Now the executor will try to spot these unrecoverable situations and return this error back to the user sooner, rather than waiting the whole stuckPodExpiry.
jankaspar
jankaspar previously approved these changes Jun 30, 2021
func hasUnpullableImageEvent(podEvents []*v1.Event) (bool, *v1.Event) {
for _, event := range podEvents {
if event.Type == v1.EventTypeWarning && strings.HasPrefix(event.Message, failedPullPrefix) {
// Failed to pull image "alpine:latst": rpc error: code = NotFound desc = failed to pull and unpack image "docker.io/library/alpine:latst": failed to resolve reference "docker.io/library/alpine:latst": docker.io/library/alpine:latst: not found
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the comments be left here?

@JamesMurkin JamesMurkin merged commit 18c9026 into master Jun 30, 2021
@JamesMurkin JamesMurkin deleted the fail_fast_pod_startup branch June 30, 2021 16:12
ljubon pushed a commit to ljubon/armada that referenced this pull request Jul 1, 2021
…project#617)

* Making executor mark pods that are unrecoverably stuck sooner

Currently if a pod is submitted with something that causes it to get "stuck" (i.e stay in Pending but Kubernetes doesn't consider it a failure), users must with the full stuckPodExpiry before Armada does anything about it.

However some reasons pods get stuck are never going to recover (invalid mount path, invalid image name etc).

Now the executor will try to spot these unrecoverable situations and return this error back to the user sooner, rather than waiting the whole stuckPodExpiry.

* Simplify logic

* Remove commented code
ljubon pushed a commit to ljubon/armada that referenced this pull request Jul 1, 2021
…project#617)

* Making executor mark pods that are unrecoverably stuck sooner

Currently if a pod is submitted with something that causes it to get "stuck" (i.e stay in Pending but Kubernetes doesn't consider it a failure), users must with the full stuckPodExpiry before Armada does anything about it.

However some reasons pods get stuck are never going to recover (invalid mount path, invalid image name etc).

Now the executor will try to spot these unrecoverable situations and return this error back to the user sooner, rather than waiting the whole stuckPodExpiry.

* Simplify logic

* Remove commented code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants