create flavor fails to set project

Bug #1654221 reported by Dr. Jens Harbott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Medium
Dr. Jens Harbott

Bug Description

$ openstack flavor create --vcpus 1 --ram 4096 --disk 10 --project demo --private test
Failed to add project demo access to flavor: Flavor auto could not be found. (HTTP 404) (Request-ID: req-f49affd9-e962-4c3d-8856-7a0a0302eade)
+----------------------------+--------------------------------------+
| Field | Value |
+----------------------------+--------------------------------------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 0 |
| disk | 10 |
| id | 6361feb4-5805-4c57-b7a3-ee73ee890234 |
| name | test |
| os-flavor-access:is_public | False |
| properties | |
| ram | 4096 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | 1 |
+----------------------------+--------------------------------------+
$ openstack flavor show test
+----------------------------+--------------------------------------+
| Field | Value |
+----------------------------+--------------------------------------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 0 |
| access_project_ids | |
| disk | 10 |
| id | 6361feb4-5805-4c57-b7a3-ee73ee890234 |
| name | test |
| os-flavor-access:is_public | False |
| properties | |
| ram | 4096 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | 1 |
+----------------------------+--------------------------------------+

Adding the project once the flavor is created does work, though:

$ openstack flavor set --project demo test
(osc) (dev_hh) root@controller-node11:~# openstack flavor show test
+----------------------------+--------------------------------------+
| Field | Value |
+----------------------------+--------------------------------------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 0 |
| access_project_ids | 84b4d9d148224241b227fe4e3ae3a0b0 |
| disk | 10 |
| id | 6361feb4-5805-4c57-b7a3-ee73ee890234 |
| name | test |
| os-flavor-access:is_public | False |
| properties | |
| ram | 4096 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | 1 |
+----------------------------+--------------------------------------+

The issue does not happen if an ID other than auto is explicitly specified.

Changed in python-openstackclient:
assignee: nobody → Dr. Jens Rosenboom (j-rosenboom-j)
status: New → In Progress
Changed in python-openstackclient:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master)

Reviewed: https://review.openstack.org/416940
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=d8749f9148f2a78f28e91c58e698779735eae4dc
Submitter: Jenkins
Branch: master

commit d8749f9148f2a78f28e91c58e698779735eae4dc
Author: Jens Rosenboom <email address hidden>
Date: Thu Jan 5 12:34:43 2017 +0100

    Fix creating a private flavor with ID auto

    When a private flavor is created with ID auto (=default) and a project
    is specified for it, instead of trying to add the project to the flavor
    called "auto" the ID of the newly created project should be used.

    Change-Id: I19f7a0ec26bd5d147f00ecba3312240e3601567e
    Closes-Bug: 1654221

Changed in python-openstackclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-openstackclient 3.7.0

This issue was fixed in the openstack/python-openstackclient 3.7.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.