Skip to content

Prefetch CirrOS images from GitHub Releases - #45

Open
Sharpz7 wants to merge 1 commit into
gophercloud:mainfrom
Sharpz7:prefetch-cirros
Open

Sharpz7 wants to merge 1 commit into
gophercloud:mainfrom
Sharpz7:prefetch-cirros

Conversation

@Sharpz7

@Sharpz7 Sharpz7 commented Nov 23, 2026 •

Copy link
Copy Markdown

The Ironic devstack plugin hardcodes http://download.cirros-cloud.net for its CirrOS images. That host often times out from GitHub runners: in an openstack-exporter baremetal job, wget failed with Connection timed out on IPv4 and Network is unreachable on IPv6, retried for about five minutes, and stack.sh exited with Not found. The same job passed on a rerun.

This adds a step before stack.sh that downloads cirros-<version>-<arch>-uec.tar.gz and -disk.img from GitHub Releases into devstack/files/. Devstack skips its own wget when the file already exists. The version comes from CIRROS_VERSION in conf_overrides, or from devstack's stackrc; the arch from CIRROS_ARCH or uname -m. A failed download logs a warning and devstack fetches the image itself.

Assisted-By: Claude

The Ironic devstack plugin hardcodes http://download.cirros-cloud.net
for its CirrOS images. That host often times out from GitHub runners,
and `stack.sh` fails after about five minutes of retries.

Download the `uec.tar.gz` and `disk.img` images from GitHub Releases
into `devstack/files/` before `stack.sh`. Devstack skips its own `wget`
when the file already exists. The version comes from `CIRROS_VERSION`
in `conf_overrides`, or from devstack's `stackrc`. A failed download
logs a warning and leaves devstack to fetch the image itself.

Add the opt-out input `prefetch_cirros` and document it in `README.md`.

Assisted-By: Claude

@mandre mandre 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.

I just noticed that devstack uses the cirros github releases for its download URLs:
https://opendev.org/openstack/devstack/src/commit/6085a27cb365a92a58c813039fabc656add16d7c/stackrc#L682

So, with this new finding I wonder if that's not better to just update the ironic devstack plugin to use github rather than download.cirros-cloud.net.

@mandre mandre 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.

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.

2 participants