Skip to content

image-manager: correct the multi image rotation - #1142

Merged
berendt merged 3 commits into
mainfrom
image-manager-os-purpose-rotation
Nov 13, 2026
Merged

berendt merged 3 commits into
mainfrom
image-manager-os-purpose-rotation

Conversation

@ideaship

Copy link
Copy Markdown
Contributor

The "Image with regular rebuilds" section of the image manager page describes the rotation of multi images in a way that no longer matches openstack-image-manager.

  • When an image of type multi is rotated, the superseded image can get os_purpose: oldgeneric. The page did not mention it, although generic is the marker user automation resolves a distribution and version to. The demotion only happens when the new image is also generic, public or community, not hidden, and matches on architecture, os_distro and os_version, so the page lists those conditions.
  • The example listed two versions under one image-level os_purpose: generic and os_version. That creates two generic images for the same combination, which the SCS image standard the page cites forbids, and nothing in the tool repairs it. The example now lists one version, as every multi image in the shipped catalog does, and the rotation steps describe what happens when that entry is replaced with a newer build.
  • "By default the last three images will be visible" has not been true since the fixed count was removed from openstack-image-manager in 2022. osism manage images always passes --hide, so a superseded image becomes community right away. It is deleted only with --delete, and only beyond what its uuid_validity keeps.

A run without --latest rotates a single-version image since OSISM 11.0.3, which ships the fix:

🤖 Generated with Claude Code

When an image of type multi is rotated, openstack-image-manager can
change the os_purpose of the superseded image from generic to
oldgeneric. The guide did not say so, although os_purpose=generic is
the marker a user's automation resolves an architecture, os_distro and
os_version combination to. An operator had no way to learn that the
marker moves, or that oldgeneric images in their cloud were written by
this tool.

The demotion is conditional: the new image must also be generic,
public or community and not hidden, and match the superseded image on
architecture, os_distro and os_version. Otherwise the two images do not
conflict under the SCS uniqueness rule, and the superseded one stays
generic. List the rule with these conditions in the SCS image standard
section, which collects rules of this shape.

Also state that the label stays on every superseded image: the
standard defines oldgeneric as a general purpose image that has been
replaced, with no recency implied.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Roger Luethi <luethi@osism.tech>
The example for an image with regular rebuilds listed two versions
under one image-level os_purpose: generic and os_version: '24.04', and
stated that it creates Ubuntu 24.04 (20240416) and Ubuntu 24.04. Both
images are public, generic and on the same architecture, os_distro and
os_version, which the SCS image standard cited a few lines above
forbids. An operator following the page is in violation after the
first run.

Nothing in the tool repairs it either. The demotion to oldgeneric
happens when an image gives up the plain name. On a first run, the
newest version takes the plain name from no one, so no image is
demoted, and later runs leave both images generic.

List one version instead, which is what every multi image in the
shipped catalog does, and say why. The rotation steps then describe
what happens when contrib/update.py replaces that entry with a newer
build and the next run imports it.

That a run without --latest rotates such an image depends on
osism/openstack-image-manager#1317, shipped in OSISM 11.0.3
(openstack-image-manager 0.20261111.0). Earlier releases write the new
version's metadata onto the existing image instead of importing the
new build. The 11.0.3 release notes cover that fix, so the page
describes the current behaviour only.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Roger Luethi <luethi@osism.tech>
The page said that the last three images of a multi image stay
visible and that a fourth one is changed to community. That was true
when openstack-image-manager hard-coded it in e7ec8cb, counting the
versions listed in the definition. The refactor in 4181757 (#236)
dropped the rule, and the keep count later came from uuid_validity.

Now a superseded image is changed to community whenever --hide is
given, and osism manage images always passes it. Deletion needs
--delete and applies only to the images beyond what uuid_validity
promises; last-N keeps the newest N images, the current one included.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Roger Luethi <luethi@osism.tech>
@github-actions

Copy link
Copy Markdown

✅⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Max errors Warnings Elapsed time
✅ ACTION actionlint 5 0 0 0.04s
✅ JSON jsonlint 4 0 0 0.07s
✅ JSON prettier 4 0 0 0.28s
✅ JSON v8r 4 0 0 7.46s
✅ MARKDOWN markdownlint 184 0 0 1.72s
✅ MARKDOWN markdown-table-formatter 184 0 0 0.18s
✅ REPOSITORY betterleaks yes no no 0.42s
✅ REPOSITORY checkov yes no no 13.14s
✅ REPOSITORY git_diff yes no no 0.04s
✅ REPOSITORY secretlint yes no no 0.85s
✅ REPOSITORY trufflehog yes no no 2.12s
✅ SPELL codespell 194 0 0 0.28s
⚠️ SPELL lychee 194 6 0 14.55s
✅ YAML prettier 6 0 0 0.17s
✅ YAML v8r 6 0 0 4.11s
✅ YAML yamllint 6 0 0 0.24s

Detailed Issues

⚠️ SPELL / lychee - 6 errors
📝 Summary
---------------------
🔍 Total.........1308
🔗 Unique.........961
✅ Successful....1182
⏳ Timeouts.........0
🔀 Redirected.......9
👻 Excluded.......120
❓ Unknown..........0
🚫 Errors...........6
⛔ Unsupported......6

Errors in .claude/skills/security-advisory/reference/style.md
[ERROR] file://.claude/skills/guides/operations-guide/openstack/security-updates.md (at 189:3) | File not found. Check if file exists and path is correct

Errors in .claude/skills/security-advisory/SKILL.md
[400] https://cveawg.mitre.org/api/cve/ (at 16:18) | Rejected status code: 400 Bad Request
[404] https://raw.githubusercontent.com/osism/ (at 17:18) | Rejected status code: 404 Not Found
[400] https://registry.osism.tech/service/token (at 18:19) | Rejected status code: 400 Bad Request

Errors in docs/concepts/cluster-network.md
[ERROR] https://frrouting.org/ (at 27:2) | TLS handshake failed. Check SSL/TLS configuration

Errors in docs/guides/developer-guide/style-guide.md
[ERROR] https://wiki.openstack.org/wiki/GitCommitMessages (at 79:1) | Network unreachable. Check internet connection or VPN settings

Hint: Followed 9 redirects. You might want to consider replacing redirecting URLs with the resolved URLs. Use verbose mode (`-v`/`-vv`) to see redirection details.

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@10.2.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,JSON_JSONLINT,JSON_V8R,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_BETTERLEAKS,REPOSITORY_SECRETLINT,REPOSITORY_TRUFFLEHOG,SPELL_LYCHEE,SPELL_CODESPELL,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is provided by OX Security
Show us your support by starring ⭐ the repository

@ideaship
ideaship marked this pull request as ready for review November 13, 2026 15:15
@ideaship ideaship self-assigned this Nov 13, 2026
@berendt
berendt merged commit 7027149 into main Nov 13, 2026
6 checks passed
@berendt
berendt deleted the image-manager-os-purpose-rotation branch November 13, 2026 15:45
@github-project-automation github-project-automation Bot moved this from New to Done in Human Board Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants