← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1013417] Re: Cinderclient Doesn't Return A Useful Error When Trying To Create A Volume Larger Than The Quota Allocation

 

** Changed in: python-cinderclient
       Status: Fix Committed => Fix Released

** Changed in: python-cinderclient
    Milestone: None => 1.3.1

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1013417

Title:
  Cinderclient Doesn't Return A Useful Error When Trying To Create A
  Volume Larger Than The Quota Allocation

Status in OpenStack Compute (Nova):
  Fix Released
Status in OpenStack Compute (nova) icehouse series:
  Fix Released
Status in Python client library for Cinder:
  Fix Released

Bug description:
  Actually, it is nearly useless. It just returns an exception that it
  casts from a HTTP 500.

  My quota limit is 1000GB, here I try to make a volume that is 2000GB

  g = cinderclient(request).volumes.create(size, display_name=name,
  display_description=description)

  cinderclient connection created using token
  "e3fbb3c2d94949b0975db11de85bebc5" and url
  "http://10.145.1.51:8776/v1/9da18fcaedf74eb7b1cf73b67b5b870c";

  REQ: curl -i
  http://10.145.1.51:8776/v1/9da18fcaedf74eb7b1cf73b67b5b870c/volumes -X
  POST -H "X-Auth-Project-Id: 9da18fcaedf74eb7b1cf73b67b5b870c" -H
  "User-Agent: python-novaclient" -H "Content-Type: application/json" -H
  "Accept: application/json" -H "X-Auth-Token:
  e3fbb3c2d94949b0975db11de85bebc5"

  REQ BODY: {"volume": {"snapshot_id": null, "display_name": "My Vol",
  "volume_type": null, "display_description": "", "size": 2000}}

  RESP:{'date': 'Thu, 14 Jun 2012 22:14:02 GMT', 'status': '500',
  'content-length': '128', 'content-type': 'application/json;
  charset=UTF-8', 'x-compute-request-id': 'req-316c81e2-3407-4df0-8b0e-
  190bf63f549b'} {"computeFault": {"message": "The server has either
  erred or is incapable of performing the requested operation.", "code":
  500}}

  *** ClientException: The server has either erred or is incapable of
  performing the requested operation. (HTTP 500) (Request-ID: req-
  316c81e2-3407-4df0-8b0e-190bf63f549b)

  This is basically useless from an end-user perspective and doesn't
  allow us to tell users of Horizon anything useful about why this
  error'd. :( It should probably be a 406, not a 500, and the error
  message should be "Cannot create a volume of 2000GB because your quota
  is currently 1000GB." Or something along those lines...

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1013417/+subscriptions