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

Backoff on etcd errors #5710

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion flytepropeller/pkg/controller/nodes/task/backoff/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,12 @@
return apiErrors.IsForbidden(err) && strings.Contains(err.Error(), "exceeded quota")
}

func IsEtcdError(err error) bool {
return apiErrors.IsForbidden(err) && strings.Contains(err.Error(), "etcdserver:")

Check warning on line 199 in flytepropeller/pkg/controller/nodes/task/backoff/handler.go

View check run for this annotation

Codecov / codecov/patch

flytepropeller/pkg/controller/nodes/task/backoff/handler.go#L198-L199

Added lines #L198 - L199 were not covered by tests
}

func IsBackOffError(err error) bool {
return IsResourceQuotaExceeded(err) || apiErrors.IsTooManyRequests(err) || apiErrors.IsServerTimeout(err)
return IsResourceQuotaExceeded(err) || apiErrors.IsTooManyRequests(err) || apiErrors.IsServerTimeout(err) || IsEtcdError(err)
}

func GetComputeResourceAndQuantity(err error, resourceRegex *regexp.Regexp) v1.ResourceList {
Expand Down
Loading