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

driver: fix image_pull_timeout #218

Merged
merged 3 commits into from
Mar 20, 2023
Merged

driver: fix image_pull_timeout #218

merged 3 commits into from
Mar 20, 2023

Conversation

lgfa29
Copy link
Contributor

@lgfa29 lgfa29 commented Mar 11, 2023

Previously the value for image_pull_timeout was being capped by client_http_timeout because the image pull request used the same HTTP client as other requests.

Increasing client_http_timeout in order to be able to set a higher image_pull_timeout is not a good option since it requires updating all client's configuration. It also affects all other HTTP requests, which may not be desirable.

The change creates a separate client for slow operations that don't have a timeout configured. Operation timeout is controlled using a ContextWithTimeout().

Closes #207

Previously the value for `image_pull_timeout` was being capped by
`client_http_timeout` because the image pull request used the same HTTP
client as other requests.

Increasing `client_http_timeout` in order to be able to set a higher
`image_pull_timeout` is not a good option since it requires updating all
client's configuration. It also affects all other HTTP requests, which
may not be desirable.

The change creates a separate client for slow operations that don't have
a timeout configured. Operation timeout is controlled using a
ContextWithTimeout().
driver_test.go Show resolved Hide resolved
@courtland
Copy link
Contributor

lgtm. Thank you.

driver_test.go Show resolved Hide resolved
Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

LGTM

@lgfa29 lgfa29 merged commit 94e6347 into main Mar 20, 2023
@lgfa29 lgfa29 deleted the fix-pull-timeout branch March 20, 2023 21:23
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.

Default image_pull_timeout exceeds client_http_timeout
4 participants