| Summary: | after editing a flavor used by an instance, flavor is not found when doing nova show | ||
|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Eduard Barrera <ebarrera> |
| Component: | openstack-nova | Assignee: | Eoghan Glynn <eglynn> |
| Status: | CLOSED WONTFIX | QA Contact: | Prasanth Anbalagan <panbalag> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 8.0 (Liberty) | CC: | berrange, dasmith, dclarke, eglynn, kchamart, sbauza, sferdjao, sgordon, srevivo, vromanso |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-12-02 13:42:09 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
Thanks for taking the time to report this, Eduard. This is a known issue with the way flavors have historically been handled in Nova. The workaround is to create new flavors rather than edit existing flavors. The upstream Nova team has recently been working on changing the way flavors are implemented to address issues like these, but those changes are not in OPS8. This re-implementation of flavors started in Mitaka (OSP9) and continued into Newton (OSP10). These changes are pretty significant, including the addition of a new database and new flavor tables, so they won't be backported to earlier releases of OSP. If you're curious, you can see some of the development here: - https://blueprints.launchpad.net/nova/+spec/flavor-cell-api - http://specs.openstack.org/openstack/nova-specs/specs/newton/implemented/flavor-cell-api.html Have a great weekend! My above answer in comment #3 wasn't entirely correct. I just double checked with the person who re-implemented flavors in OPS9/OPS10, and they said editing a flavor via horizon will still result in the behaviour you described because Nova intentionally doesn't support that use-case (and won't in the future either). It does get better in OPS9/OPS10 though because the flavor definition the instance was created with is preserved independent of the master flavor definition. WONTFIX/NOTABUG therefore QE Won't automate |
Description of problem: When a flavor is edited, one new intry es created and the current one is soft deleted on the database, for example: > select * from instance_types where name="m1.small"; +---------------------+---------------------+---------------------+----------+----+-----------+-------+------+-------------+--------------------------------------+-------------+---------+--------------+----------+-----------+---------+ | created_at | updated_at | deleted_at | name | id | memory_mb | vcpus | swap | vcpu_weight | flavorid | rxtx_factor | root_gb | ephemeral_gb | disabled | is_public | deleted | +---------------------+---------------------+---------------------+----------+----+-----------+-------+------+-------------+--------------------------------------+-------------+---------+--------------+----------+-----------+---------+ | 2016-11-14 11:00:55 | NULL | NULL | m1.small | 11 | 2048 | 4 | 0 | NULL | 2 | 1 | 20 | 0 | 0 | 1 | 0 | | 2016-11-14 10:06:33 | 2016-11-14 11:00:55 | 2016-11-14 11:00:55 | m1.small | 10 | 2048 | 2 | 0 | NULL | debc3cf0-bce1-416a-8e6d-c487592c30e6 | 1 | 20 | 0 | 0 | 1 | 10 | +---------------------+---------------------+---------------------+----------+----+-----------+-------+------+-------------+--------------------------------------+-------------+---- After that # nova show <instance>, return flavor not found: $ nova show 8013ac19-1ef6-4fe1-a35b-6e5f3f66fa04 +--------------------------------------+----------------------------------------------------------------------------------+ | Property | Value | +--------------------------------------+----------------------------------------------------------------------------------+ | OS-DCF:diskConfig | AUTO | | OS-EXT-AZ:availability_zone | nova | | OS-EXT-SRV-ATTR:host | overcloud-compute-0.localdomain | | OS-EXT-SRV-ATTR:hostname | red-hat-cloudforms-4.0 | | OS-EXT-SRV-ATTR:hypervisor_hostname | overcloud-compute-0.localdomain | | OS-EXT-SRV-ATTR:instance_name | instance-00000101 | | OS-EXT-SRV-ATTR:kernel_id | | | | default network | 192.168.100.13, 10.67.16.214 | | flavor | Flavor not found (2d115bc8-eca7-4478-86fd-00e3f9a42cb1) <=================================== | id | 8013ac19-1ef6-4fe1-a35b-6e5f3f66fa04 | | image | [ceph] RedHat Cloudforms 4.0 (638a8846-e6ff-4f91-aef0-6c21c8c3babe) | | key_name | heat_admin | | locked | True | The given procedure to reproduce below: use horizon 1. create a flavor (take note of the uid) 2. edit the flavor and save it, uid will change now test it on a running instance 1. create a flavor (take note of the uid) 2. spawn an instance using the flavor created 3. edit the flavor and save it, uid will change 4. refresh your browser and check the instance spawned using the flavor created, you will notice that it will say "not available" on the size column. 5. if you don't see the changes in the dashboard, you will see it on cli "nova show {instance_id}" I was unable to repoduce the issue. Additionally I tried to give access to a flavor to a specially created tenant, created and instance using given flavor, remove access to the flavor, then nova show return and error but it's not the same reported here Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: OSP8 use horizon 1. create a flavor (take note of the uid) 2. edit the flavor and save it, uid will change now test it on a running instance 1. create a flavor (take note of the uid) 2. spawn an instance using the flavor created 3. edit the flavor and save it, uid will change 4. refresh your browser and check the instance spawned using the flavor created, you will notice that it will say "not available" on the size column. 5. if you don't see the changes in the dashboard, you will see it on cli "nova show {instance_id}" Actual results: $ nova show 8013ac19-1ef6-4fe1-a35b-6e5f3f66fa04 +--------------------------------------+----------------------------------------------------------------------------------+ | Property | Value | +--------------------------------------+----------------------------------------------------------------------------------+ | | OS-EXT-SRV-ATTR:kernel_id | | | | default network | 192.168.100.13, 10.67.16.214 | | flavor | Flavor not found (2d115bc8-eca7-4478-86fd-00e3f9a42cb1) <======================== Expected results: No erros and flavor looked up correctly