create flavor fails to set project

Bug #1654221 reported by Dr. Jens Harbott on 2017-01-05
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

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

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  Edit
Everyone can see this information.

Other bug subscribers