2024-03-06 12:54:32 |
Dmitriy Rabotyagov |
description |
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/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 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`:
https://paste.openstack.org/show/bAcVuwGePhihSLs7xGG0/ |
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/ |
|