Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image cleanup broken after failed import #876

Open
osfrickler opened this issue Feb 14, 2025 · 0 comments
Open

Image cleanup broken after failed import #876

osfrickler opened this issue Feb 14, 2025 · 0 comments

Comments

@osfrickler
Copy link
Member

When an image import (upload) fails, the properties for the image have not yet been set when the manager tries to clean up the image, leading to a traceback like

│ /usr/local/lib/python3.12/site-packages/openstack_image_manager/main.py:1015 in manage_outdated_images                                                       │                                                                                                                 
│                                                                                                                                                              │                                                                                                                 
│   1012 │   │   │   logger.info(f"Processing image '{image}' (removal candidate)")                                                                            │                                                                                                                 
│   1013 │   │   │                                                                                                                                             │                                                                                                                 
│   1014 │   │   │   cloud_image = cloud_images[image]                                                                                                         │                                                                                                                 
│ ❱ 1015 │   │   │   image_name = cloud_image.properties["image_description"]                                                                                  │                                                                                                                 
│   1016 │   │   │                                                                                                                                             │                                                                                                                 
│   1017 │   │   │   if image_name not in images:                                                                                                              │                                                                                                                 
│   1018 │   │   │   │   logger.warning(                                                                                                                       │                                                                                                                 
│                                                                                                                                                              │
...
KeyError: 'image_description'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant