Skip to content

Commit 5ce23e1

Browse files
committed
Change os_purpose=generic to oldgeneric for previous multi image
This is the minimal change to address #1262 Signed-off-by: Matthias Büchse <matthias.buechse@cloudandheat.com>
1 parent dc25797 commit 5ce23e1

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

openstack_image_manager/main.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,6 +1262,14 @@ def rename_images(
12621262
logger.info(f"Renaming old latest '{name}' to '{previous_latest}'")
12631263
self.image_proxy.update_image(previous_image.id, name=previous_latest)
12641264

1265+
if previous_image["properties"].get("os_purpose") == "generic":
1266+
# you can't have more than one image of the same architecture, distro, and version
1267+
# with os_purpose=generic, so change this to oldgeneric for the previous image
1268+
self.image_proxy.update_image(
1269+
previous_image.id,
1270+
os_purpose="oldgeneric",
1271+
)
1272+
12651273
logger.info(f"Renaming imported image '{imported_image.name}' to '{name}'")
12661274
self.image_proxy.update_image(imported_image.id, name=name)
12671275

0 commit comments

Comments
 (0)