Skip to content

Use aria2 prefetch fallback for octavia image import#2462

Merged
berendt merged 3 commits into
mainfrom
manager-aria2
Jul 14, 2026
Merged

Use aria2 prefetch fallback for octavia image import#2462
berendt merged 3 commits into
mainfrom
manager-aria2

Conversation

@ideaship

@ideaship ideaship commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

What

Wires the OSISM manager to use the aria2 + glance-direct import fallback for the
octavia amphora image, whose source download from object storage is chronically
slow (see osism/issues#1411).

Changes

  • Install aria2 in the manager image (provides aria2c for the prefetch path).
  • Raise the octavia image task timeout (3600 → 5400 s) to accommodate a local
    download + staging on top of the import.
  • Set octavia --stuck-retry 0: a single web-download attempt, then fall back to
    aria2 + glance-direct (the default --prefetch on-stuck) — retrying the slow
    source just wastes another multi-minute transfer.

Merge order

--stuck-retry 0 is only safe once the fallback exists in the installed
image-manager; shipping it earlier would leave octavia with a single web-download
attempt and no fallback — less resilient than today's two attempts. So this PR is
kept in draft and merged only together with the pin bump:

  1. merge Add aria2 prefetch + glance-direct import fallback openstack-image-manager#1252 (the engine)
  2. cut an openstack-image-manager release containing it
  3. bump requirements.openstack-image-manager.txt to that release on this
    branch
    , take this PR out of draft, and merge

aria2 install and the timeout bump are harmless on their own; keeping them here
with the pin makes the whole change atomic.

Related

🤖 Generated with Claude Code

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • Consider making the increased octavia image task timeout (5400s) a configurable value rather than a hardcoded constant so it can be tuned for different environments without code changes.
  • Since this change assumes an image-manager release with the --prefetch option, consider adding a guard or version/feature check so the manager fails fast with a clear message if it is used with an older image-manager that lacks this flag.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider making the increased octavia image task timeout (5400s) a configurable value rather than a hardcoded constant so it can be tuned for different environments without code changes.
- Since this change assumes an image-manager release with the `--prefetch` option, consider adding a guard or version/feature check so the manager fails fast with a clear message if it is used with an older image-manager that lacks this flag.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@ideaship
ideaship marked this pull request as draft July 14, 2026 04:45
@ideaship
ideaship marked this pull request as ready for review July 14, 2026 05:37
@ideaship
ideaship marked this pull request as draft July 14, 2026 06:46
@ideaship ideaship moved this from In review to In progress in Human Board Jul 14, 2026
@ideaship
ideaship marked this pull request as ready for review July 14, 2026 07:34

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

ideaship added 3 commits July 14, 2026 09:36
The image-manager can now fall back to downloading an image with aria2c
and importing it via glance-direct when Glance's web-download stalls
(used for the octavia amphora image). Add the aria2 package to the
manager image so the aria2c binary is available at runtime.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Roger Luethi <luethi@osism.tech>
The octavia amphora image import can now fall back from web-download to
aria2 + glance-direct, which adds a local ~1 GB download and a staging
upload on top of the normal import. Raise this task's timeout from 3600
to 5400 seconds so the fallback has room to complete within the budget;
the other image-manager tasks are unchanged.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Roger Luethi <luethi@osism.tech>
The amphora image source is chronically slow, so a stuck web-download
import rarely recovers on an immediate retry -- the retry just spends
another multi-minute doomed transfer. Set --stuck-retry to 0 so there is
a single web-download attempt; on its failure the default --prefetch
on-stuck path falls back to aria2 + glance-direct, which is the robust
recovery. Good-path imports are unchanged (web-download still tried once).

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Roger Luethi <luethi@osism.tech>
@berendt
berendt merged commit e3923f4 into main Jul 14, 2026
3 checks passed
@berendt
berendt deleted the manager-aria2 branch July 14, 2026 07:41
@github-project-automation github-project-automation Bot moved this from In progress to Done in Human Board Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants