From 6468bcb4bf0c18422bd6ba8ccfc17c1aa893d771 Mon Sep 17 00:00:00 2001 From: Roger Luethi Date: Tue, 27 Oct 2026 19:58:07 +0100 Subject: [PATCH 1/3] image-manager: document the os_purpose rotation 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 --- .../openstack/tools/image-manager/index.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/guides/operations-guide/openstack/tools/image-manager/index.md b/docs/guides/operations-guide/openstack/tools/image-manager/index.md index 07f3402be8..6aacbb4bd8 100644 --- a/docs/guides/operations-guide/openstack/tools/image-manager/index.md +++ b/docs/guides/operations-guide/openstack/tools/image-manager/index.md @@ -258,6 +258,13 @@ for all parameters. After a change to the configuration, validate it with in the metadata of an image. * The value of `url` of a specific version of an image is stored as `image_source` in the metadata of an image. +* When an image of type `multi` is rotated, the `os_purpose` of the superseded + image is changed from `generic` to `oldgeneric` if the new image is also + `generic`, is `public` or `community`, is not hidden, and has the same + `architecture`, `os_distro` and `os_version`. The standard permits at most one + such image for any one combination of these three values. Every superseded + image keeps `oldgeneric`. It marks a general purpose image that has been + replaced, not the most recent replacement. ### Image with regular rebuilds From 7a3299de8324bb0de9730a84f105cee7f2f64334 Mon Sep 17 00:00:00 2001 From: Roger Luethi Date: Tue, 27 Oct 2026 19:58:21 +0100 Subject: [PATCH 2/3] image-manager: fix the multi image example 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 --- .../openstack/tools/image-manager/index.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/guides/operations-guide/openstack/tools/image-manager/index.md b/docs/guides/operations-guide/openstack/tools/image-manager/index.md index 6aacbb4bd8..52f619669f 100644 --- a/docs/guides/operations-guide/openstack/tools/image-manager/index.md +++ b/docs/guides/operations-guide/openstack/tools/image-manager/index.md @@ -302,20 +302,23 @@ images: versions: - version: '20240416' url: https://cloud-images.ubuntu.com/noble/20240416/noble-server-cloudimg-amd64.img - - version: '20240422' - url: https://cloud-images.ubuntu.com/noble/20240422/noble-server-cloudimg-amd64.img ``` +Only one version is listed. Every listed version is imported, and here all of +them would have `os_version: '24.04'`. Several versions would therefore create +several images with `os_purpose: generic` for the same combination of +`architecture`, `os_distro` and `os_version`, which the SCS image standard does +not permit. -This configuration creates the following images: +This configuration creates the following image: -* **Ubuntu 24.04 (20240416)** * **Ubuntu 24.04** -If a newer build is added, the following rotation takes place: +When a newer build is released, the entry in `versions` is replaced with it. +The next run imports the new build and the following rotation takes place: -* **Ubuntu 24.04 (20240416)** does not change -* **Ubuntu 24.04** becomes **Ubuntu 24.04 (20240422)** +* **Ubuntu 24.04** becomes **Ubuntu 24.04 (20240416)** and its `os_purpose` + changes from `generic` to `oldgeneric` * the new image becomes **Ubuntu 24.04** By default the last three images will be visible. When a fourth image is added, the visibility of From 5d8d8bb85c5c9c2c7eb1e7a868616939bf733a80 Mon Sep 17 00:00:00 2001 From: Roger Luethi Date: Tue, 27 Oct 2026 19:58:28 +0100 Subject: [PATCH 3/3] image-manager: correct what happens to superseded images 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 --- .../operations-guide/openstack/tools/image-manager/index.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/guides/operations-guide/openstack/tools/image-manager/index.md b/docs/guides/operations-guide/openstack/tools/image-manager/index.md index 52f619669f..5416f3b0bf 100644 --- a/docs/guides/operations-guide/openstack/tools/image-manager/index.md +++ b/docs/guides/operations-guide/openstack/tools/image-manager/index.md @@ -321,8 +321,10 @@ The next run imports the new build and the following rotation takes place: changes from `generic` to `oldgeneric` * the new image becomes **Ubuntu 24.04** -By default the last three images will be visible. When a fourth image is added, the visibility of -the last image in the list is changed to `community` and the image can be deleted in the future. +With `--hide`, which `osism manage images` always passes, the visibility of a +superseded image is changed to `community`. Superseded images are only deleted +with `--delete`, and only those beyond what their `uuid_validity` promises. For +instance, `last-3` keeps the newest three images, the current one included. ### Image without regular rebuild