quota set failed

Bug #1420104 reported by Wei Xiaoli
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned
OpenStack Identity (keystone)
Invalid
Undecided
Unassigned
python-openstackclient
In Progress
Medium
jiaxi

Bug Description

1: source file:
export NOVA_VERSION=1.1
export no_proxy=$no_proxy, [overcloud_ip]
export OS_PASSWORD=redhat
export OS_TENANT_ID=86c0d2458dbb4adc990bab70ef3546f5
export OS_PROJECT_ID=86c0d2458dbb4adc990bab70ef3546f5
export OS_AUTH_URL=https://[overcloud_ip]:5000/v3
export OS_USER_DOMAIN_ID=9a03881b62ca449f87f8d5a1ceaad845
export OS_USERNAME=testuser_dx_px
export COMPUTE_API_VERSION=1.1
export OS_NO_CACHE=True
export OS_IDENTITY_API_VERSION=3
export OS_CACERT=/usr/local/share/ca-certificates/ephemeralca-cacert.crt
PS2=$PS1
export PS1=($OS_USERNAME)$PS1
export OS_PS1=$PS2

2: testuser_dx_px was created via v3 keystone API as below:
(admin)cetest@cer106n*:~/lily$ openstack domain create test_domain
+---------+----------------------------------+
| Field | Value |
+---------+----------------------------------+
| enabled | True |
| id | 9a03881b62ca449f87f8d5a1ceaad845 |
| name | test_domain |
+---------+----------------------------------+
(admin)cetest@cer106n*:~/lily$ openstack project create --domain test_domain --description "test project" --enable te stproject_dx
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | test project |
| domain_id | 9a03881b62ca449f87f8d5a1ceaad845 |
| enabled | True |
| id | 86c0d2458dbb4adc990bab70ef3546f5 |
| name | testproject_dx |
+-------------+----------------------------------+
(admin)cetest@cer106n*:~/lily$ openstack user create --password redhat --email <email address hidden> --project testproject_dx --domai n test_domain --description "user in test_domain and testproject_dx." --enable testuser_dx_px
+--------------------+-----------------------------------------+
| Field | Value |
+--------------------+-----------------------------------------+
| default_project_id | 86c0d2458dbb4adc990bab70ef3546f5 |
| description | user in test_domain and testproject_dx. |
| domain_id | 9a03881b62ca449f87f8d5a1ceaad845 |
| email | <email address hidden> |
| enabled | True |
| id | ddf3e092104b4f47bbf25dc39342159c |
| name | testuser_dx_px |
+--------------------+-----------------------------------------+

3: project quota set failed[openstackclient cmd]
(testuser_dx_px)(testuser_dx_px)root@overcloud-ce-controller-controller1-gcf3ewgvxb4l:~# openstack --version
openstack 0.4.1
(testuser_dx_px)(testuser_dx_px)root@overcloud-ce-controller-controller1-gcf3ewgvxb4l:~# openstack quota show testproject_dx
+----------------------+----------------+
| Field | Value |
+----------------------+----------------+
| backup_gigabytes | 1000 |
| backups | 10 |
| cores | -1 |
| fixed-ips | -1 |
| floating-ips | 10 |
| gigabytes | 1000 |
| injected-file-size | 10240 |
| injected-files | 5 |
| injected-path-size | 255 |
| instances | 40 |
| key-pairs | 100 |
| project | testproject_dx |
| properties | 50 |
| ram | 16000 |
| secgroup-rules | 20 |
| secgroups | 10 |
| server_group_members | 10 |
| server_groups | 10 |
| snapshots | 10 |
| volumes | 10 |
+----------------------+----------------+
(testuser_dx_px)(testuser_dx_px)root@overcloud-ce-controller-controller1-gcf3ewgvxb4l:~# openstack quota set --ram 15360 testproject_dx
ERROR: openstack Bad Request (HTTP 400) (Request-ID: req-29f562c4-8cf0-4e2f-97f0-d4a11bf16ebf)
(testuser_dx_px)(testuser_dx_px)root@overcloud-ce-controller-controller1-gcf3ewgvxb4l:~# openstack quota show testproject_dx
+----------------------+----------------+
| Field | Value |
+----------------------+----------------+
| backup_gigabytes | 1000 |
| backups | 10 |
| cores | -1 |
| fixed-ips | -1 |
| floating-ips | 10 |
| gigabytes | 1000 |
| injected-file-size | 10240 |
| injected-files | 5 |
| injected-path-size | 255 |
| instances | 40 |
| key-pairs | 100 |
| project | testproject_dx |
| properties | 50 |
| ram | 15360 |
| secgroup-rules | 20 |
| secgroups | 10 |
| server_group_members | 10 |
| server_groups | 10 |
| snapshots | 10 |
| volumes | 10 |
+----------------------+----------------+
(testuser_dx_px)(testuser_dx_px)root@overcloud-ce-controller-controller1-gcf3ewgvxb4l:~# openstack quota set --floating-ips 20 testproject_dx
ERROR: openstack Bad Request (HTTP 400) (Request-ID: req-97f2955f-f39a-4356-a2e0-13c840b82665)
(testuser_dx_px)(testuser_dx_px)root@overcloud-ce-controller-controller1-gcf3ewgvxb4l:~# openstack quota show testproject_dx
+----------------------+----------------+
| Field | Value |
+----------------------+----------------+
| backup_gigabytes | 1000 |
| backups | 10 |
| cores | -1 |
| fixed-ips | -1 |
| floating-ips | 10 |
| gigabytes | 1000 |
| injected-file-size | 10240 |
| injected-files | 5 |
| injected-path-size | 255 |
| instances | 40 |
| key-pairs | 100 |
| project | testproject_dx |
| properties | 50 |
| ram | 15360 |
| secgroup-rules | 20 |
| secgroups | 10 |
| server_group_members | 10 |
| server_groups | 10 |
| snapshots | 10 |
| volumes | 10 |
+----------------------+----------------+
(testuser_dx_px)(testuser_dx_px)root@overcloud-ce-controller-controller1-gcf3ewgvxb4l:~# openstack quota set --volumes 20 testproject_dx
ERROR: openstack Bad Request (HTTP 400) (Request-ID: req-d516f932-e5d3-46f7-b8f9-ec296f49f7e2)
(testuser_dx_px)(testuser_dx_px)root@overcloud-ce-controller-controller1-gcf3ewgvxb4l:~# openstack quota show testproject_dx
+----------------------+----------------+
| Field | Value |
+----------------------+----------------+
| backup_gigabytes | 1000 |
| backups | 10 |
| cores | -1 |
| fixed-ips | -1 |
| floating-ips | 10 |
| gigabytes | 1000 |
| injected-file-size | 10240 |
| injected-files | 5 |
| injected-path-size | 255 |
| instances | 40 |
| key-pairs | 100 |
| project | testproject_dx |
| properties | 50 |
| ram | 15360 |
| secgroup-rules | 20 |
| secgroups | 10 |
| server_group_members | 10 |
| server_groups | 10 |
| snapshots | 10 |
| volumes | 10 |
+----------------------+----------------+
(testuser_dx_px)(testuser_dx_px)root@overcloud-ce-controller-controller1-gcf3ewgvxb4l:~# openstack quota set --ram 18000 testproject_dx
ERROR: openstack Bad Request (HTTP 400) (Request-ID: req-1004a40d-957b-4db0-85ad-367bc19f4793)
(testuser_dx_px)(testuser_dx_px)root@overcloud-ce-controller-controller1-gcf3ewgvxb4l:~# openstack quota show testproject_dx
+----------------------+----------------+
| Field | Value |
+----------------------+----------------+
| backup_gigabytes | 1000 |
| backups | 10 |
| cores | -1 |
| fixed-ips | -1 |
| floating-ips | 10 |
| gigabytes | 1000 |
| injected-file-size | 10240 |
| injected-files | 5 |
| injected-path-size | 255 |
| instances | 40 |
| key-pairs | 100 |
| project | testproject_dx |
| properties | 50 |
| ram | 18000 |
| secgroup-rules | 20 |
| secgroups | 10 |
| server_group_members | 10 |
| server_groups | 10 |
| snapshots | 10 |
| volumes | 10 |
+----------------------+----------------+
(testuser_dx_px)(testuser_dx_px)root@overcloud-ce-controller-controller1-gcf3ewgvxb4l:~# openstack quota set --key-pairs 50 testproject_dx
ERROR: openstack Bad Request (HTTP 400) (Request-ID: req-475d1b73-7bac-45e7-a870-54e52d914c30)
(testuser_dx_px)(testuser_dx_px)root@overcloud-ce-controller-controller1-gcf3ewgvxb4l:~# openstack quota show testproject_dx
+----------------------+----------------+
| Field | Value |
+----------------------+----------------+
| backup_gigabytes | 1000 |
| backups | 10 |
| cores | -1 |
| fixed-ips | -1 |
| floating-ips | 10 |
| gigabytes | 1000 |
| injected-file-size | 10240 |
| injected-files | 5 |
| injected-path-size | 255 |
| instances | 40 |
| key-pairs | 100 |
| project | testproject_dx |
| properties | 50 |
| ram | 18000 |
| secgroup-rules | 20 |
| secgroups | 10 |
| server_group_members | 10 |
| server_groups | 10 |
| snapshots | 10 |
| volumes | 10 |
+----------------------+----------------+
(testuser_dx_px)(testuser_dx_px)root@overcloud-ce-controller-controller1-gcf3ewgvxb4l:~#

Tags: quotas
Revision history for this message
Morgan Fainberg (mdrnstm) wrote :

I am not sure this is something specific with Keystone or if this is something related with Nova. I'm marking this as incomplete as I need more information as to what the failure is. I am also adding Nova to this bug, but they likely will need more deployment information as well.

Changed in keystone:
status: New → Incomplete
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

thanks Morgan. yes, marked as Incomplete for Nova as well

Changed in nova:
status: New → Incomplete
Joe Gordon (jogo)
tags: added: quotas
Revision history for this message
David J Hu (david-j-hu) wrote :

Since the error is observed as the result of running "openstack quota set...", the first level triage should be done in openstack client with debug data.

Revision history for this message
Sean Dague (sdague) wrote :

I think this is probably an issue in the way openstack client issues these things.

Changed in nova:
status: Incomplete → Invalid
Dean Troyer (dtroyer)
Changed in python-openstackclient:
status: New → Confirmed
importance: Undecided → Medium
jiaxi (tjxiter)
Changed in python-openstackclient:
assignee: nobody → jiaxi (tjxiter)
Revision history for this message
jiaxi (tjxiter) wrote :
Download full text (12.3 KiB)

According to http://docs.openstack.org/developer/python-openstackclient/command-objects/quota.html

os quota set
    # Compute settings
    [--cores <num-cores>]
    [--fixed-ips <num-fixed-ips>]
    [--floating-ips <num-floating-ips>]
    [--injected-file-size <injected-file-bytes>]
    [--injected-files <num-injected-files>]
    [--instances <num-instances>]
    [--key-pairs <num-key-pairs>]
    [--properties <num-properties>]
    [--ram <ram-mb>]

    # Volume settings
    [--gigabytes <new-gigabytes>]
    [--snapshots <new-snapshots>]
    [--volumes <new-volumes>]
    [--volume-type <volume-type>]

    <project>

stack@openstack:~$ openstack quota show testproject_dx
+-----------------------+----------------+
| Field | Value |
+-----------------------+----------------+
| backup_gigabytes | 1000 |
| backups | 10 |
| cores | 20 |
| fixed-ips | -1 |
| floating-ips | 10 |
| gigabytes | 1000 |
| gigabytes_lvmdriver-1 | -1 |
| injected-file-size | 10240 |
| injected-files | 5 |
| injected-path-size | 255 |
| instances | 10 |
| key-pairs | 100 |
| per_volume_gigabytes | -1 |
| project | testproject_dx |
| properties | 128 |
| ram | 51200 |
| secgroup-rules | 20 |
| secgroups | 10 |
| server_group_members | 10 |
| server_groups | 10 |
| snapshots | 10 |
| snapshots_lvmdriver-1 | -1 |
| volumes | 10 |
| volumes_lvmdriver-1 | -1 |
+-----------------------+----------------+

stack@openstack:~$ openstack quota set --cores 11 testproject_dx
stack@openstack:~$ openstack quota show testproject_dx
+-----------------------+----------------+
| Field | Value |
+-----------------------+----------------+
| backup_gigabytes | 1000 |
| backups | 10 |
| cores | 11 |
| fixed-ips | -1 |
| floating-ips | 10 |
| gigabytes | 1000 |
| gigabytes_lvmdriver-1 | -1 |
| injected-file-size | 10240 |
| injected-files | 5 |
| injected-path-size | 255 |
| instances | 10 |
| key-pairs | 100 |
| per_volume_gigabytes | -1 |
| project | testproject_dx |
| properties | 128 |
| ram | 51200 |
| secgroup-rules | 20 |
| secgroups | 10 |
| server_group_members | 10 |
| server_groups | 10 |
| snapshots | 10 |
| snapshots_lvmdriver-1 | -1 |
| volumes | 10 |
| volumes_lvmdriver-1 | -1 |
+-----------------------+--------...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/203312

Changed in python-openstackclient:
status: Confirmed → In Progress
Revision history for this message
jiaxi (tjxiter) wrote :

@Dean Troyer (dtroyer)

There is no unit test for openstackclient/common/quota.py.
Can I add with this bug fix ? or report another bug ?

Revision history for this message
Steve Martinelli (stevemar) wrote :

@jiaxi add tests in the same patch as the bug fix

Revision history for this message
jiaxi (tjxiter) wrote :

@Steve Martinelli (stevemar)
 openstackclient/common/quota.py
Add whole tests for this mini bug ?

Revision history for this message
jiaxi (tjxiter) wrote :

Below five quota set failed,
fixed-ips,floating-ips,injected-file-size,injected-files,key-pairs
Because fixed-ips will be changed to be fixed_ips in code, so use
fixed-ips to get value, will be None.
However 'injected_file_content_bytes' should be 'injected_file_size'
in nova, can make 'quota set injected-file-size' ok.It's a nova bug.
In VOLUME_QUOTAS, key == value, and what's more, quota set fine with
volume. And the bug is only about the above five, all is compute quota.
Keep things short and concise,this bug is only about compute quota set.
So there is no need to change volume quota set.

Dolph Mathews (dolph)
Changed in keystone:
status: Incomplete → Invalid
Revision history for this message
jiaxi (tjxiter) wrote :

@Dolph Mathews (dolph) :
Hi, I submitted a patch to fix this issue. https://review.openstack.org/#/c/203312/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master)

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

commit 77214c56e78dff60cdaf8fa2a446fd9658261cbf
Author: jiaxi <email address hidden>
Date: Fri Jul 17 23:29:50 2015 -0400

    Fix quota set failed problem

    When using the command: openstack quota set, the compute quota below
    can't be set successfully,the value of compute quota stay unchanged,
    'fixed-ips', 'floating-ips', 'injected-files', 'key-pairs'.

    What's more,I add a TODO comment in the code for two reason.
    1. volume quota set works fine for the moment.
    2. To indicate that this issue about volume needs
       discuss and report another bug, if it's confirmed.

    This bug is only about compute quota.

    Change-Id: Ic1028d561f5a0030cf65ac18fc117bf01e945478
    Partial-Bug: #1420104

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.