At the moment, if there're more then 1 image that match 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 code, there's a verification, that only 1 resource should be returned, otherwise an exception should be raised:
However, the exception is highly likely suppressed on some higher level, and meaningless `luster type (vm, None, kubernetes) not supported` being raised instead.
On other note, it would make sense to always ask for 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 current behaviour, which is that Magnum will fetch all images by name, even deactivated ones, which should be filtered out in a request:
At the moment, if there're more then 1 image that match 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 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/ 9d6eae72cc32000 5f0c588e65acbfd 16617008c8/ magnum/ api/utils. py#L112- L138
This check is triggered from here: /opendev. org/openstack/ magnum/ src/commit/ 9d6eae72cc32000 5f0c588e65acbfd 16617008c8/ magnum/ api/attr_ validator. py#L36
https:/
However, the exception is highly likely suppressed on some higher level, and meaningless `luster type (vm, None, kubernetes) not supported` being raised instead.
On other note, it would make sense to always ask for 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 current behaviour, 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`: /paste. openstack. org/show/ bAcVuwGePhihSLs 7xGG0/
https:/