-
Notifications
You must be signed in to change notification settings - Fork 164
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
Allow download retrying if the computed and configured checksums differ. #4455
Allow download retrying if the computed and configured checksums differ. #4455
Conversation
jsfakian
commented
Dec 3, 2024
- We have identified that downloading images under poor networking conditions from datastores might fail silently due to the SDK libraries we use for for Azure and AWS. This happens when we are installing new applications.
- Another observation we made is that when we manually try re-installing the applications, they eventually succeed in the installation.
- With this patch, we automate retrying the image download a fixed number of times (5 by default) if the computed versus the configure checksums differ.
dbcf812
to
c8cf95f
Compare
c8cf95f
to
213e610
Compare
if config.RefCount != 0 && (status.HasError() || status.State != types.DOWNLOADED) { | ||
// or status is not downloaded or retry then do install | ||
if config.RefCount != 0 && (status.HasError() || | ||
status.State != types.DOWNLOADED || config.DoRetry) { |
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.
The State != types.DOWNLOADED
condition looks suspicious to me. Isn't it too vague? Shouldn't it be at least status.State < types.DOWNLOADED && ...
or even status.State == DOWNLOADING && ...
?
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.
It was like that before. Should we change it?
213e610
to
9884a04
Compare
9884a04
to
9110498
Compare
9110498
to
619ad71
Compare
619ad71
to
9d1f5ae
Compare
- We have identified that downloading images under poor networking conditions from datastores might fail silently due to the SDK libraries we use for for Azure and AWS. This happens when we are installing new applications. - Another observation we made is that when we manually try re-installing the applications, they eventually succeed in the installation. - With this patch, we automate retrying the image download a fixed number of times (5 by default) if the computed versus the configure checksums differ. Signed-off-by: Ioannis Sfakianakis <[email protected]>
9d1f5ae
to
99af741
Compare
// Retrying the download due to image verification failure | ||
// This happens when: RefCount and retryCount is non-zero, | ||
// and DownloaderStatus state is "downloaded" |
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.
Shouldn't this comment move up to where the new code is?
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.
LGTM assuming you verified that the effect of moving the HasRef inside the function doesn't change anything i.e., that all the call sites to MaybeRemove cleared the boolean before your change.