Repository navigation
image-manager: correct the multi image rotation - #1142
Merged
Merged
Conversation
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>
✅
|
| 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 | ||
| 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

Show us your support by starring ⭐ the repository
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The "Image with regular rebuilds" section of the image manager page describes the rotation of
multiimages in a way that no longer matches openstack-image-manager.multiis rotated, the superseded image can getos_purpose: oldgeneric. The page did not mention it, althoughgenericis the marker user automation resolves a distribution and version to. The demotion only happens when the new image is alsogeneric,publicorcommunity, not hidden, and matches onarchitecture,os_distroandos_version, so the page lists those conditions.os_purpose: genericandos_version. That creates twogenericimages 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 everymultiimage in the shipped catalog does, and the rotation steps describe what happens when that entry is replaced with a newer build.osism manage imagesalways passes--hide, so a superseded image becomescommunityright away. It is deleted only with--delete, and only beyond what itsuuid_validitykeeps.A run without
--latestrotates a single-version image since OSISM 11.0.3, which ships the fix:🤖 Generated with Claude Code