The bug is still open, not released.
A user who does not have admin privileges is *not* allowed to perform "flavor manage". But he is still able to set "flavor extra spec".
> stack@new-vm:/opt/stack/devstack$ nova flavor-create test-1 123 512 1 1
> ERROR: Policy doesn't allow compute_extension:flavormanage to be performed. (HTTP 403) (Request-ID: req-e8236e5b-f51e-4f37-a2f8-0c875583e180)
> stack@new-vm:/opt/stack/devstack$ nova flavor-key 1 set spec2=spec2
> stack@new-vm:/opt/stack/devstack$
policy.json that my Devstack is using has the following code added:
The bug is still open, not released.
A user who does not have admin privileges is *not* allowed to perform "flavor manage". But he is still able to set "flavor extra spec".
> stack@new- vm:/opt/ stack/devstack$ nova flavor-create test-1 123 512 1 1 extension: flavormanage to be performed. (HTTP 403) (Request-ID: req-e8236e5b- f51e-4f37- a2f8-0c875583e1 80) vm:/opt/ stack/devstack$ nova flavor-key 1 set spec2=spec2 vm:/opt/ stack/devstack$
> ERROR: Policy doesn't allow compute_
> stack@new-
> stack@new-
policy.json that my Devstack is using has the following code added:
"compute_ extension: flavorextraspec s:index" : "", extension: flavorextraspec s:show" : "", extension: flavorextraspec s:create" : "rule:admin_api", extension: flavorextraspec s:update" : "rule:admin_api", extension: flavorextraspec s:delete" : "rule:admin_api",
"compute_
"compute_
"compute_
"compute_
Refer the pastebin : pastebin. ubuntu. com/1540305/
http://
Sequence of activities that I have performed in my Devstack machine:
root@new- vm:/opt/ stack/nova/ etc/nova# env | grep OS Openstack1 127.0.0. 1:5000/ v2.0 NAME=admin /opt/stack/ data/CA/ int-ca/ ca-chain. pem /usr/bin/ lesspipe %s %s vm:/opt/ stack/nova/ etc/nova# nova flavor-create test-flavor 123 512 1 1 ------- ------+ ------- ----+-- ----+-- ------- --+---- --+---- ---+--- ------- ---+--- ------- -+----- ------- -+ ------- ------+ ------- ----+-- ----+-- ------- --+---- --+---- ---+--- ------- ---+--- ------- -+----- ------- -+ ------- ------+ ------- ----+-- ----+-- ------- --+---- --+---- ---+--- ------- ---+--- ------- -+----- ------- -+ vm:/opt/ stack/nova/ etc/nova# nova flavor-key 123 set key1=value1 vm:/opt/ stack/nova/ etc/nova# nova flavor-show 123 ------- ------- ------- -+----- ------- ------- ---+ ------- ------- ------- -+----- ------- ------- ---+ DISABLED: disabled | False | EXT-DATA: ephemeral | 0 | access: is_public | True | ------- ------- ------- -+----- ------- ------- ---+ vm:/opt/ stack/nova/ etc/nova# export OS_USERNAME=demo vm:/opt/ stack/nova/ etc/nova# export OS_TENANT_NAME=demo vm:/opt/ stack/nova/ etc/nova# nova flavor-create test-flavor2 333 512 1 1 extension: flavormanage to be performed. (HTTP 403) (Request-ID: req-27ffd9b1- 28a9-437b- b87b-bb2545a752 a4) vm:/opt/ stack/nova/ etc/nova# nova flavor-key 123 set key2=value2 vm:/opt/ stack/nova/ etc/nova# nova flavor-show 123 ------- ------- ------- -+----- ------- ------- ------- ------- ------- --+ ------- ------- ------- -+----- ------- ------- ------- ------- ------- --+ DISABLED: disabled | False | EXT-DATA: ephemeral | 0 | access: is_public | True | ------- ------- ------- -+----- ------- ------- ------- ------- ------- --+ vm:/opt/ stack/nova/ etc/nova# cat policy.json | grep flavorextraspec s:create extension: flavorextraspec s:create" : "rule:admin_api", vm:/opt/ stack/nova/ etc/nova# cat policy.json | grep flavorextraspecs extension: flavorextraspec s:index" : "", extension: flavorextraspec s:show" : "", extension: flavorextraspec s:create" : "rule:admin_api", extension: flavorextraspec s:update" : "rule:admin_api", extension: flavorextraspec s:delete" : "rule:admin_api", vm:/opt/ stack/nova/ etc/nova#
OS_PASSWORD=
OS_AUTH_URL=http://
OS_USERNAME=admin
OS_TENANT_
OS_CACERT=
OS_NO_CACHE=1
LESSCLOSE=
root@new-
+-----+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | extra_specs |
+-----+
| 123 | test-flavor | 512 | 1 | 0 | | 1 | 1.0 | True | {} |
+-----+
root@new-
root@new-
+------
| Property | Value |
+------
| OS-FLV-
| OS-FLV-
| disk | 1 |
| extra_specs | {u'key1': u'value1'} |
| id | 123 |
| name | test-flavor |
| os-flavor-
| ram | 512 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | 1 |
+------
root@new-
root@new-
root@new-
ERROR: Policy doesn't allow compute_
root@new-
root@new-
+------
| Property | Value |
+------
| OS-FLV-
| OS-FLV-
| disk | 1 |
| extra_specs | {u'key2': u'value2', u'key1': u'value1'} |
| id | 123 |
| name | test-flavor |
| os-flavor-
| ram | 512 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | 1 |
+------
root@new-
"compute_
root@new-
"compute_
"compute_
"compute_
"compute_
"compute_
root@new-