Page MenuHomePhabricator

tofu-infra: opentofu-created flavors may be disabled by default
Open, LowPublic

Description

I have created an openstack nova flavor with opentofu today, in the tofu-infra repository, and it came to life disable, thus being useless for the purpose of using it.

aborrero@cloudcontrol2004-dev:~ $ sudo wmcs-openstack flavor show 74307309-258b-435c-a1b0-3d684bb0062c
+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field                      | Value                                                                                                                                                                                                            |
+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| OS-FLV-DISABLED:disabled   | True                                                                                                                                                                                                             |
| OS-FLV-EXT-DATA:ephemeral  | 0                                                                                                                                                                                                                |
| access_project_ids         | ['admin']                                                                                                                                                                                                        |
| description                | None                                                                                                                                                                                                             |
| disk                       | 4                                                                                                                                                                                                                |
| id                         | 74307309-258b-435c-a1b0-3d684bb0062c                                                                                                                                                                             |
| name                       | g3.cores1.ram2.disk4                                                                                                                                                                                             |
| os-flavor-access:is_public | False                                                                                                                                                                                                            |
| properties                 | aggregate_instance_extra_specs:ceph='true', aggregate_instance_extra_specs:network-agent='linuxbridge', quota:disk_read_iops_sec='5000', quota:disk_total_bytes_sec='200000000', quota:disk_write_iops_sec='500' |
| ram                        | 2048                                                                                                                                                                                                             |
| rxtx_factor                | 1.0                                                                                                                                                                                                              |
| swap                       | 0                                                                                                                                                                                                                |
| vcpus                      | 1                                                                                                                                                                                                                |
+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Note the OS-FLV-DISABLED:disabled | True

A quick search online suggests this is expected in the context of the opentofu openstack provider. Also, the openstack API itself may not allow to set that property?

Additionally, the openstack opentofu provider seems to prefer if a flavor is reference using ID rather than name, when creating a VM. Seems like a bug that only adds to the previous confusion.

See also: