yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #36951
[Bug 1485767] [NEW] deleted flavors no longer have extra_specs
Public bug reported:
When a flavor with extra_specs is deleted the extra_specs are marked as
deleted as well. Instance built with the deleted flavor of course still
point to the deleted flavor row. When looking up the extra_specs for
the flavor associated with the instance none are returned as the lookup
does not take into account deleted rows.
For example (running on devstack):
$ nova flavor-create --is-public true bar 23 8192 23 6
$ nova flavor-key 23 set foobar=baz
$ nova flavor-show 23
+----------------------------+---------------------------------+
| Property | Value |
+----------------------------+---------------------------------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 0 |
| disk | 23 |
| extra_specs | {"zonecfg:brand": "solaris-kz"} |
| id | 23 |
| name | bar |
| os-flavor-access:is_public | True |
| ram | 8192 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | 6 |
+----------------------------+---------------------------------+
$ nova flavor-delete 23 (yes there is a bug against this and probably
shouldn't work... but good to show the problem)
$ nova flavor-show 23
+----------------------------+-------+
| Property | Value |
+----------------------------+-------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 0 |
| disk | 23 |
| extra_specs | N/A | <--- extra_specs are not set.
| id | 23 |
| name | bar |
| os-flavor-access:is_public | True |
| ram | 8192 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | 6 |
+----------------------------+-------+
If you remove the deletion markings in the instance_type_extra_specs table for the row, then the extra_specs will show up. While it's not so much the nova flavor-show output above that creates a problem, its when code attempts to use an instance objects instance_type_id and nova.objects.flavor.Flavor.get_by_id() that the extra_specs are not loaded and therefor it appears there are no extra_specs for the flavor that the instance was created with.
** Affects: nova
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1485767
Title:
deleted flavors no longer have extra_specs
Status in OpenStack Compute (nova):
New
Bug description:
When a flavor with extra_specs is deleted the extra_specs are marked
as deleted as well. Instance built with the deleted flavor of course
still point to the deleted flavor row. When looking up the
extra_specs for the flavor associated with the instance none are
returned as the lookup does not take into account deleted rows.
For example (running on devstack):
$ nova flavor-create --is-public true bar 23 8192 23 6
$ nova flavor-key 23 set foobar=baz
$ nova flavor-show 23
+----------------------------+---------------------------------+
| Property | Value |
+----------------------------+---------------------------------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 0 |
| disk | 23 |
| extra_specs | {"zonecfg:brand": "solaris-kz"} |
| id | 23 |
| name | bar |
| os-flavor-access:is_public | True |
| ram | 8192 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | 6 |
+----------------------------+---------------------------------+
$ nova flavor-delete 23 (yes there is a bug against this and probably
shouldn't work... but good to show the problem)
$ nova flavor-show 23
+----------------------------+-------+
| Property | Value |
+----------------------------+-------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 0 |
| disk | 23 |
| extra_specs | N/A | <--- extra_specs are not set.
| id | 23 |
| name | bar |
| os-flavor-access:is_public | True |
| ram | 8192 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | 6 |
+----------------------------+-------+
If you remove the deletion markings in the instance_type_extra_specs table for the row, then the extra_specs will show up. While it's not so much the nova flavor-show output above that creates a problem, its when code attempts to use an instance objects instance_type_id and nova.objects.flavor.Flavor.get_by_id() that the extra_specs are not loaded and therefor it appears there are no extra_specs for the flavor that the instance was created with.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1485767/+subscriptions