Magnum unobviosly fails to create a cluster template when more then 1 image exists with same name

Bug #2056324 reported by Dmitriy Rabotyagov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
New
Undecided
Unassigned

Bug Description

At the moment, if there is more then 1 image that matches the provided name, Magnum fails to create a cluster template with:

`Cluster type (vm, None, kubernetes) not supported`

Eventually, there're multiple bugs and way forward with that incorporated. From what I do see in the code, there's a verification, that only 1 resource should be returned, otherwise an exception should be raised:

https://opendev.org/openstack/magnum/src/commit/9d6eae72cc320005f0c588e65acbfd16617008c8/magnum/api/utils.py#L112-L138

This check is triggered from here:
https://opendev.org/openstack/magnum/src/commit/9d6eae72cc320005f0c588e65acbfd16617008c8/magnum/api/attr_validator.py#L36

However, the exception is highly likely suppressed on some higher level, and a meaningless `Cluster type (vm, None, kubernetes) not supported` being raised instead.

On other note, it would make sense to always ask for the latest image and avoid such confusing situations. But I can see how Magnum might want to explicitly fail on creation in such cases.

However, there is another related bug to the current behavior, which is that Magnum will fetch all images by name, even deactivated ones, which should be filtered out in a request.

In the paste below you can see, that Magnum got 2 images, one of which is deactivated, and then failed with `Cluster type (vm, None, kubernetes) not supported`:
https://paste.openstack.org/show/bAcVuwGePhihSLs7xGG0/

description: updated
summary: Magnum unobviosly fails to create a cluster template when more then 1
- image exists
+ image exists with same name
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.