Skip to content

capi: retry upstream artifact downloads - #2138

Merged
kubernetes-prow[bot] merged 1 commit into
kubernetes-sigs:mainfrom
MaxRink:capi/retry-upstream-artifact-downloads
Aug 17, 2026
Merged

capi: retry upstream artifact downloads#2138
kubernetes-prow[bot] merged 1 commit into
kubernetes-sigs:mainfrom
MaxRink:capi/retry-upstream-artifact-downloads

Conversation

@MaxRink

@MaxRink MaxRink commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it

The build fetches release artifacts from github.com and storage.googleapis.com. One read timeout stops the whole packer build. Unrelated pull requests then show a red check.

Example from a recent pull-azure-sigs run:

TASK [kubernetes : Download crictl]
fatal: [default]: FAILED! => {"changed": false, "elapsed": 10,
  "msg": "Connection failure: The read operation timed out",
  "url": ".../cri-tools/releases/download/v1.36.0/crictl-v1.36.0-linux-amd64.tar.gz.sha256"}

This change adds a retry loop to the get_url tasks in the node build path:

  • kubernetes role: crictl, CNI tarball, Kubernetes binaries, Kubernetes images
  • containerd role: containerd, containerd.service, runc, wasm shims, gvisor runsc

Three tasks already set retries without until. Ansible sets retries to 1 when until is absent, so those retries never run. This change adds until to them:

  • load_additional_components role: additional executables, additional images
  • gpu role: Flatcar nvidia-runtime sysext image

The retry pattern matches the one for apt lock contention in roles/kubernetes/tasks/debian.yml.

The downloads keep their checksum. A retry cannot hide a corrupt artifact.

How this was verified

  • ansible-lint reports 0 failures on the changed files.
  • The changed files parse as valid YAML.

Which issue(s) this PR fixes

The failure appears on #2072, #2080, #2087 and #2098. None of these pull requests change the download tasks.

Release note

Retry upstream artifact downloads so a transient network failure does not stop an image build.

@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 14, 2026
The build fetches release artifacts from github.com and
storage.googleapis.com. One read timeout stops the whole packer build.

    TASK [kubernetes : Download crictl]
    fatal: [default]: FAILED! => {"msg": "Connection failure: The read
    operation timed out", "url": ".../crictl-v1.36.0-linux-amd64.tar.gz.sha256"}

This commit adds a retry loop to the get_url tasks in the node build path.

Three tasks already set retries without until. Ansible sets retries to 1
when until is absent, so those retries never run. This commit adds until
to them.

The downloads keep their checksum. A retry cannot hide a corrupt artifact.

@mboersma mboersma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm
/approve

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 17, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mboersma

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow kubernetes-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 17, 2026
@kubernetes-prow
kubernetes-prow Bot merged commit b059f2e into kubernetes-sigs:main Aug 17, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants