Private flavors can't be used
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Opinion
|
Wishlist
|
Unassigned |
Bug Description
I'm testing nova client 2.9.0.
I worked as a user with admin privileges.
I created a private flavor with command:
$ nova flavor-create myFlavor 10 512 1 1 --is-public false
+----+-
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | extra_specs |
+----+-
| 10 | myFlavor | 512 | 1 | 0 | | 1 | 1 | False | {} |
+----+-
Then, I associated the just created flavor to the tenant I was using with command:
$ nova flavor-access-add 10 admin
+------
| Flavor_ID | Tenant_ID |
+------
| 10 | admin |
+------
If I list the flavors, with command nova flavor-list, the new flavor is not displayed:
$ nova flavor-list
+----+-
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | extra_specs |
+----+-
| 1 | m1.tiny | 512 | 0 | 0 | | 1 | 1.0 | True | {} |
| 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0 | True | {} |
| 3 | m1.medium | 4096 | 40 | 0 | | 2 | 1.0 | True | {} |
| 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0 | True | {} |
| 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0 | True | {} |
+----+-
Even in the case I list with this other command, the new flavor is not shown:
$ nova flavor-access-list --flavor=10
ERROR: Failed to get access list for public flavor type.
$ nova flavor-access-list --tenant admin
ERROR: Sorry, query by tenant not supported.
Please note that I get the same results if I don't associate the private flavor to any project.
According to the specification I found here https:/
Changed in nova: | |
importance: | Undecided → Wishlist |
status: | New → Confirmed |
Changed in nova: | |
assignee: | Sulochan Acharya (sulochan-acharya) → nobody |
More information and, very likely, a different bug.
I launched an instance using the private flavor and it worked.
Fine!
So, what I reported when I opened the bug seems to be related to display.
But, if I change the current project (aka tenant), I can still use the flavor that's supposed to be private.
In fact I changed the current user and the current tenant, the latter is NOT associated to the private flavor.
Then I launched an instance indicating the private flavor I created.
$ nova boot testFlavor10Marco1 --image f413b150- 48d3-4c50- a265-9711805cce 17 --flavor 10
+------ ------- ------- ----+-- ------- ------- ------- ------- ------- -+ ------- ------- ----+-- ------- ------- ------- ------- ------- -+ STS:power_ state | 0 | STS:task_ state | scheduling | 27T15:18: 57Z | f3fc-4b39- 9a8a-274f3d1f66 92 | 0.3.0-x86_ 64-disk | c82d2f29aa1b0fc 37 | 27T15:19: 00Z | 5b6b2c3257e8c75 2d | ------- ------- ----+-- ------- ------- ------- ------- ------- -+
| Property | Value |
+------
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-
| OS-EXT-
| OS-EXT-STS:vm_state | building |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | qdsRTn27B7Wb |
| config_drive | |
| created | 2012-11-
| flavor | myFlavor |
| hostId | |
| id | 8d1ad41a-
| image | cirros-
| key_name | None |
| metadata | {} |
| name | testFlavor10Marco1 |
| progress | 0 |
| security_groups | [{u'name': u'default'}] |
| status | BUILD |
| tenant_id | 2648f9f2fa894e2
| updated | 2012-11-
| user_id | 3af9666f4e504c6
+------
The operation succeed but it shouldn't because the tenant I'm using is NOT associated to the private flavor.