Error message of quota exceeded don't contain enough information

Bug #1469942 reported by Rui Chen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Rui Chen

Bug Description

1. base version

stack@devstack:/opt/stack/nova$ [master]$ git log -1
commit 6969f270c5035325c603ce7a98b1647b72bf5eaa
Merge: ae4ae93 930da44
Author: Jenkins <email address hidden>
Date: Sat Jun 27 08:40:25 2015 +0000

    Merge "Fix typos detected by toolkit misspellings."

2. nova-api.log

2015-06-30 10:55:26.637 DEBUG nova.compute.api [req-2bba2e1b-da00-477a-94e8-01eee8e17401 admin demo] cores,ram quota exceeded for 08751f5a95464f5db73d9f57d55fa6b9, tried to run 1 instances. Cannot run any mo
re instances of this type. _check_num_instances_quota /opt/stack/nova/nova/compute/api.py:442
2015-06-30 10:55:26.638 INFO nova.api.openstack.wsgi [req-2bba2e1b-da00-477a-94e8-01eee8e17401 admin demo] HTTP exception thrown: Quota exceeded for cores,ram: Requested 1, but already used 1 of 1 cores

3. reproduce steps:

* set the tenant qouta, core=1, ram=512

* boot instance with flavor m1.tiny (1 core, 512 ram)

* boot instance again with flavor m1.tiny

Expected result:

* booting instance failed in the second time, and user should know which resource is limited, core and ram.

Actual result:

* the raised exception message only contain core limit details, but no ram details.

stack@devstack:/home/devstack/logs$ [master]$ nova boot --image cirros-0.3.2-x86_64-disk --flavor m1.tiny --nic net-id=00d3142f-f2d1-4427-a0d3-d31c089f3c7e chenrui_demo
ERROR (Forbidden): Quota exceeded for cores,ram: Requested 1, but already used 1 of 1 cores (HTTP 403) (Request-ID: req-2bba2e1b-da00-477a-94e8-01eee8e17401)

As a End user, he should get the full information from the exception message, he don't know the ram limit detail, so he has no idea which flavor can be used to boot instance successfully.

Tags: quotas
Rui Chen (kiwik-chenrui)
Changed in nova:
assignee: nobody → Rui Chen (kiwik-chenrui)
Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

@Rui Chen (kiwik-chenrui):

Since you are set as assignee, I switch the status to "In Progress".

Changed in nova:
status: New → In Progress
tags: added: quotas
Revision history for this message
Rui Chen (kiwik-chenrui) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/197460
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=79fe4d8e076c9c7bb76f0afb1b2787d51b2c5037
Submitter: Jenkins
Branch: master

commit 79fe4d8e076c9c7bb76f0afb1b2787d51b2c5037
Author: Rui Chen <email address hidden>
Date: Tue Jun 30 20:34:32 2015 +0800

    Fix incomplete error message of quota exceeded

    When we boot and resize instance, if multiple requested
    resource(core, ram and instances) exceeded quota,
    only the detail of core resource will been outputed to
    user in the exception, the loss of core and instances number
    will make end user have no idea which flavor can be
    used to boot instance successfully.

    Fix this issue and update related test cases.

    Change-Id: I969d73e2f222278ea8a2bb4c21474c13ab213d81
    Closes-Bug: #1469942

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → liberty-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: liberty-rc1 → 12.0.0
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.