OpenStack Compute (Nova)

[EC2] Uncaught error when attempting to exceed quota

Reported by Dave Walker on 2011-09-18
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Medium
Julien Danjou

Bug Description

10 instances started with the following quota:
metadata_items: 128
instances: 10
injected_file_content_bytes: 10240
injected_files: 5
volumes: 10
gigabytes: 1000
cores: 20
ram: 51200
floating_ips: 10

The 11th attempt returns:

ubuntu@marula:~$ euca-run-instances -k adam ami-00000012
UnknownError: An unknown error has occurred. Please try your request again.

Log extract:
2011-09-18 13:49:20,544 DEBUG nova.api [-] action: RunInstances from (pid=14233) __call__ /usr/lib/pymodules/python2.7/nova/api/ec2/__init__.py:290
2011-09-18 13:49:20,544 DEBUG nova.api [-] arg: ImageId val: ami-00000012 from (pid=14233) __call__ /usr/lib/pymodules/python2.7/nova/api/ec2/__init__.py:292
2011-09-18 13:49:20,544 DEBUG nova.api [-] arg: KeyName val: adam from (pid=14233) __call__ /usr/lib/pymodules/python2.7/nova/api/ec2/__init__.py:292
2011-09-18 13:49:20,544 DEBUG nova.api [-] arg: MaxCount val: 1 from (pid=14233) __call__ /usr/lib/pymodules/python2.7/nova/api/ec2/__init__.py:292
2011-09-18 13:49:20,544 DEBUG nova.api [-] arg: MinCount val: 1 from (pid=14233) __call__ /usr/lib/pymodules/python2.7/nova/api/ec2/__init__.py:292
2011-09-18 13:49:20,544 DEBUG nova.api [-] arg: InstanceType val: m1.small from (pid=14233) __call__ /usr/lib/pymodules/python2.7/nova/api/ec2/__init__.py:292
2011-09-18 13:49:20,623 DEBUG nova [-] Using Kernel=17, Ramdisk=None from (pid=14233) _check_create_parameters /usr/lib/pymodules/python2.7/nova/compute/api.py:235
2011-09-18 13:49:20,662 DEBUG nova.compute.api [-] Going to run 0 instances... from (pid=14233) create /usr/lib/pymodules/python2.7/nova/compute/api.py:541
2011-09-18 13:49:20,662 ERROR nova.api [35d90850-2eba-4595-be99-276c72e082ee 58d5d9c9-cca0-4b1f-86f8-7703eaf3f42e novaporject] Unexpected error raised: list index out of range
(nova.api): TRACE: Traceback (most recent call last):
(nova.api): TRACE: File "/usr/lib/pymodules/python2.7/nova/api/ec2/__init__.py", line 398, in __call__
(nova.api): TRACE: result = api_request.invoke(context)
(nova.api): TRACE: File "/usr/lib/pymodules/python2.7/nova/api/ec2/apirequest.py", line 78, in invoke
(nova.api): TRACE: result = method(context, **args)
(nova.api): TRACE: File "/usr/lib/pymodules/python2.7/nova/api/ec2/cloud.py", line 1368, in run_instances
(nova.api): TRACE: reservation_id=instances[0]['reservation_id'])
(nova.api): TRACE: IndexError: list index out of range
(nova.api): TRACE:
2011-09-18 13:49:20,662 ERROR nova.api [35d90850-2eba-4595-be99-276c72e082ee 58d5d9c9-cca0-4b1f-86f8-7703eaf3f42e novaporject] Environment: {"CONTENT_TYPE": "application/x-www-form-urlencoded; charset=UTF-8", "SCRIPT_NAME": "/services/Cloud", "REQUEST_METHOD": "POST", "HTTP_HOST": "10.55.55.8:8773", "PATH_INFO": "/", "SERVER_PROTOCOL": "HTTP/1.0", "HTTP_USER_AGENT": "Boto/2.0 (linux2)", "SERVER_NAME": "10.55.55.8", "REMOTE_ADDR": "10.55.55.8", "wsgi.url_scheme": "http", "SERVER_PORT": "8773", "GATEWAY_INTERFACE": "CGI/1.1", "HTTP_ACCEPT_ENCODING": "identity"}
2011-09-18 13:49:20,662 ERROR nova.api [35d90850-2eba-4595-be99-276c72e082ee 58d5d9c9-cca0-4b1f-86f8-7703eaf3f42e novaporject] UnknownError: An unknown error has occurred. Please try your request again.
2011-09-18 13:49:20,663 INFO nova.api [35d90850-2eba-4595-be99-276c72e082ee 58d5d9c9-cca0-4b1f-86f8-7703eaf3f42e novaporject] 0.119684s 10.55.55.8 POST /services/Cloud/ CloudController:RunInstances 400 [Boto/2.0 (linux2)] application/x-www-form-urlencoded text/xml

Tags: ec2 Edit Tag help
Dave Walker (davewalker) on 2011-09-18
description: updated
Thierry Carrez (ttx) on 2011-10-21
Changed in nova:
importance: Undecided → Medium
status: New → Confirmed
tags: added: ec2
Russell Bryant (russellb) wrote :

Based on reading the code, it looks like this problem was fixed as a side effect of another commit.

commit 0fab78825ef06310926181f6f97d377058b56b97
Author: Chris Behrens <email address hidden>
Date: Sat Sep 24 23:49:36 2011 +0000

    compute_api create*() and schedulers refactoring

Changed in nova:
status: Confirmed → Fix Released
Julien Danjou (jdanjou) wrote :

This problem is not fixed, I hit i again in Essex 4.

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

Changed in nova:
assignee: nobody → Julien Danjou (jdanjou)
status: Fix Released → In Progress
tags: added: essex-rc-potential

Reviewed: https://review.openstack.org/5686
Committed: http://github.com/openstack/nova/commit/9d328628dea9530de629f829faa569fd87e0ac90
Submitter: Jenkins
Branch: master

commit 9d328628dea9530de629f829faa569fd87e0ac90
Author: Julien Danjou <email address hidden>
Date: Thu Mar 22 16:42:05 2012 +0100

    Handle correctly QuotaError in EC2 API

    Without this patch, EC2 API returns UnknownError when quota is exceeded, see bug #853381

    This patch fixes that by handling the exception. Now euca-run-instances returns useful information:

    $ euca-run-instances --instance-count 10 --instance-type m1.8gb.2cpus.diskless ami-00000012
    QuotaError: Quota exceeded: code=InstanceLimitExceeded

    Change-Id: I1f7b381b34d2f538b7cc2d9582a40fd8bf88fbc3
    Signed-off-by: Julien Danjou <email address hidden>

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2012-03-26
Changed in nova:
milestone: none → essex-rc2
tags: removed: essex-rc-potential

Reviewed: https://review.openstack.org/5771
Committed: http://github.com/openstack/nova/commit/de15bebf0974024d664359dd8eb5194ee6f51440
Submitter: Jenkins
Branch: milestone-proposed

commit de15bebf0974024d664359dd8eb5194ee6f51440
Author: Julien Danjou <email address hidden>
Date: Thu Mar 22 16:42:05 2012 +0100

    Handle correctly QuotaError in EC2 API

    Without this patch, EC2 API returns UnknownError when quota is exceeded, see bug #853381

    This patch fixes that by handling the exception. Now euca-run-instances returns useful information:

    $ euca-run-instances --instance-count 10 --instance-type m1.8gb.2cpus.diskless ami-00000012
    QuotaError: Quota exceeded: code=InstanceLimitExceeded

    Change-Id: I1f7b381b34d2f538b7cc2d9582a40fd8bf88fbc3
    Signed-off-by: Julien Danjou <email address hidden>

Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-rc2 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers