Bug 1324238
Summary: | When a flavor ID has capital letters, booting a VM will fail with CLI but succeeds with dashboard | ||
---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | David Hill <dhill> |
Component: | python-novaclient | Assignee: | Diana Clarke <dclarke> |
Status: | CLOSED ERRATA | QA Contact: | Prasanth Anbalagan <panbalag> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.0 (Kilo) | CC: | awaugama, berrange, dasmith, dclarke, dhill, eglynn, jruzicka, jschluet, kchamart, sbauza, sferdjao, sgordon, srevivo, vromanso, wlehman |
Target Milestone: | async | Keywords: | Reopened, ZStream |
Target Release: | 7.0 (Kilo) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | python-novaclient-2.23.0-4.el7ost | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-07-13 14:48:58 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: | |
Embargoed: |
Description
David Hill
2016-04-05 22:52:37 UTC
2016-04-05 22:35:53.312 10380 TRACE nova.api.openstack.wsgi Traceback (most recent call last): 2016-04-05 22:35:53.312 10380 TRACE nova.api.openstack.wsgi File "/usr/lib/python2.7/site-packages/nova/api/openstack/wsgi.py", line 710, in post_process_extensions 2016-04-05 22:35:53.312 10380 TRACE nova.api.openstack.wsgi **action_args) 2016-04-05 22:35:53.312 10380 TRACE nova.api.openstack.wsgi File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/contrib/flavor_access.py", line 86, in show 2016-04-05 22:35:53.312 10380 TRACE nova.api.openstack.wsgi self._extend_flavor(resp_obj.obj['flavor'], db_flavor) 2016-04-05 22:35:53.312 10380 TRACE nova.api.openstack.wsgi File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/contrib/flavor_access.py", line 78, in _extend_flavor 2016-04-05 22:35:53.312 10380 TRACE nova.api.openstack.wsgi flavor_rval[key] = flavor_ref['is_public'] 2016-04-05 22:35:53.312 10380 TRACE nova.api.openstack.wsgi TypeError: 'NoneType' object has no attribute '__getitem__' 2016-04-05 22:35:53.312 10380 TRACE nova.api.openstack.wsgi I believe this bug was introduced in OSP7/Kilo and fixed in OSP8/Liberty based on my notes from a similar bug report a few months back. - The following upstream change introduced the bug in Kilo: https://bugs.launchpad.net/python-novaclient/+bug/1423885 https://review.openstack.org/#/c/158270/10/novaclient/v2/shell.py - And the following upstream change fixed the bug in Liberty: https://bugs.launchpad.net/python-novaclient/+bug/1446850 https://review.openstack.org/#/c/176106/1/novaclient/v2/shell.py The workaround is to use lower case or numeric flavor IDs only until they upgrade to Liberty. I submitted an upstream patch for a backport to stable/kilo, but I suspect it won't merge because it's old_old_stable now that Mitaka is released. https://review.openstack.org/#/c/303051/ Verified as follows, ********* VERSION ********* [root@serverA ~(keystone_admin)]# yum list installed | grep openstack-nova openstack-nova-api.noarch 2015.1.4-8.el7ost @RH7-RHOS-7.0 openstack-nova-cert.noarch 2015.1.4-8.el7ost @RH7-RHOS-7.0 openstack-nova-common.noarch 2015.1.4-8.el7ost @RH7-RHOS-7.0 openstack-nova-compute.noarch 2015.1.4-8.el7ost @RH7-RHOS-7.0 openstack-nova-conductor.noarch 2015.1.4-8.el7ost @RH7-RHOS-7.0 openstack-nova-console.noarch 2015.1.4-8.el7ost @RH7-RHOS-7.0 openstack-nova-novncproxy.noarch 2015.1.4-8.el7ost @RH7-RHOS-7.0 openstack-nova-scheduler.noarch 2015.1.4-8.el7ost @RH7-RHOS-7.0 [root@serverA ~(keystone_admin)]# ******* LOGS ******* [root@serverA ~(keystone_admin)]# nova flavor-create MyFlavoR 100 512 1 1 +-----+----------+-----------+------+-----------+------+-------+-------------+-----------+ | ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | +-----+----------+-----------+------+-----------+------+-------+-------------+-----------+ | 100 | MyFlavoR | 512 | 1 | 0 | | 1 | 1.0 | True | +-----+----------+-----------+------+-----------+------+-------+-------------+-----------+ [root@serverA ~(keystone_admin)]# nova boot --flavor MyFlavoR --image cirros --nic net-id=c4c50776-1a75-4b1e-8ab7-0b3c3531f338 vm1 +--------------------------------------+-----------------------------------------------+ | Property | Value | +--------------------------------------+-----------------------------------------------+ | OS-DCF:diskConfig | MANUAL | | OS-EXT-AZ:availability_zone | | | OS-EXT-SRV-ATTR:host | - | | OS-EXT-SRV-ATTR:hypervisor_hostname | - | | OS-EXT-SRV-ATTR:instance_name | instance-00000001 | | OS-EXT-STS:power_state | 0 | | OS-EXT-STS:task_state | scheduling | | OS-EXT-STS:vm_state | building | | OS-SRV-USG:launched_at | - | | OS-SRV-USG:terminated_at | - | | accessIPv4 | | | accessIPv6 | | | adminPass | F3iWLM2yCHPn | | config_drive | | | created | 2016-07-05T20:46:27Z | | flavor | MyFlavoR (100) | | hostId | | | id | f412e4b4-b69a-4ffb-8825-58387edc153e | | image | cirros (cd7f7c6d-64e0-4e67-a4b3-36de7ab7e761) | | key_name | - | | metadata | {} | | name | vm1 | | os-extended-volumes:volumes_attached | [] | | progress | 0 | | security_groups | default | | status | BUILD | | tenant_id | ca832f0c3de342f89ea00a472ad3d6b5 | | updated | 2016-07-05T20:46:27Z | | user_id | 2c2ca6d2a11f454c81dec38ed4ed5c47 | +--------------------------------------+-----------------------------------------------+ [root@serverA ~(keystone_admin)]# nova list +--------------------------------------+------+--------+------------+-------------+---------------------+ | ID | Name | Status | Task State | Power State | Networks | +--------------------------------------+------+--------+------------+-------------+---------------------+ | f412e4b4-b69a-4ffb-8825-58387edc153e | vm1 | BUILD | spawning | NOSTATE | public=172.24.4.227 | +--------------------------------------+------+--------+------------+-------------+---------------------+ [root@serverA ~(keystone_admin)]# nova list +--------------------------------------+------+--------+------------+-------------+---------------------+ | ID | Name | Status | Task State | Power State | Networks | +--------------------------------------+------+--------+------------+-------------+---------------------+ | f412e4b4-b69a-4ffb-8825-58387edc153e | vm1 | ACTIVE | - | Running | public=172.24.4.227 | +--------------------------------------+------+--------+------------+-------------+---------------------+ Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1417 |