Code missing from error message when quota-breaching instance launched via OS API

Bug #950768 reported by Eoghan Glynn
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Wishlist
Eoghan Glynn

Bug Description

When an instance launch is attempted via the OpenStack API, but the instances quota is already fully utilized, the error message in the 413 overLimit response is not correctly marshalled:

 {u'overLimit': {u'message': u'Quota exceeded: code=%(code)s', u'code': 413, u'retryAfter': 0}}

The 'code=%(code)s' string lacks parameter subsititution so is unclear as to the actual quota that has been breached (e.g. it could be floating IP as opposed to instance stravation).

Whereas when attempting the instance launch via the EC2 API, the correct code is included in the 413 response:

  Quota exceeded: code=InstanceLimitExceeded

Eoghan Glynn (eglynn)
Changed in nova:
assignee: nobody → Eoghan Glynn (eglynn)
Eoghan Glynn (eglynn)
Changed in nova:
status: New → In Progress
Eoghan Glynn (eglynn)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
milestone: none → essex-rc1
importance: Undecided → Wishlist
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/5151
Committed: http://github.com/openstack/nova/commit/b5f75253048438891a8740a1ea4719e5f3208ccb
Submitter: Jenkins
Branch: master

commit b5f75253048438891a8740a1ea4719e5f3208ccb
Author: Eoghan Glynn <email address hidden>
Date: Fri Mar 9 15:15:23 2012 +0000

    Sub in InstanceLimitExceeded in overLimit message

    Fixes bug 950768

    Previously the error message in the 413 overLimit response returned
    by the OS compute API was missing a parameter subsitution indicating
    the actual quota that was breeched:

      'Quota exceeded: code=%(code)s'

    This is now properly reported as:

      'Quota exceeded: code=InstanceLimitExceeded'

    Also a potentially useful log message is no longer discarded.

    Change-Id: I7e1f8b078329a6530bb7d7ea3b006ff578cdcdd3

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-rc1 → 2012.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.