← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1216929] Re: when ephemeral_gb and swap is default value 0, the response is wrong in v3 flavor api

 

** Changed in: nova
       Status: Fix Committed => Fix Released

-- 
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/1216929

Title:
  when ephemeral_gb and swap is default value 0, the response is wrong
  in v3 flavor api

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  when I port flaovr tempest test in nova v3. I find when create flavor with default value of ephemeral_gb and swap (both of them are 0). the response is "".  I think it's bug. I look into the code find that the issue is
  swap": flavor.get("swap") or "",
  "ephemeral": flavor.get("ephemeral_gb") or "",

  it's a logic bug in nova/api/openstack/compute/views/flavors.py, I
  think.

  the tempest log is the following:

  2013-08-26 21:45:10.222 31704 INFO tempest.common.rest_client [-] Request: POST http://192.168.1.101:8774/v3/flavors
  2013-08-26 21:45:10.222 31704 DEBUG tempest.common.rest_client [-] Request Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<Token omitted>'} _log_request /opt/stack/tempest/tempest/common/rest_client.py:295
  2013-08-26 21:45:10.222 31704 DEBUG tempest.common.rest_client [-] Request Body: {"flavor": {"disk": 10, "vcpus": 1, "ram": 512, "name": "test_flavor_832042179", "id": 1663317675}} _log_request /opt/stack/tempest/tempest/common/rest_client.py:299
  2013-08-26 21:45:10.628 31704 INFO tempest.common.rest_client [-] Response Status: 200
  2013-08-26 21:45:10.628 31704 DEBUG tempest.common.rest_client [-] Response Headers: {'date': 'Mon, 26 Aug 2013 13:45:10 GMT', 'content-length': '369', 'content-type': 'application/json', 'x-compute-request-id': 'req-7ba21477-fda1-41f0-a782-3d58b05f293a'} _log_response /opt/stack/tempest/tempest/common/rest_client.py:310
  2013-08-26 21:45:10.628 31704 DEBUG tempest.common.rest_client [-] Response Body: {"flavor": {"name": "test_flavor_832042179", "links": [{"href": "http://192.168.1.101:8774/v3/flavors/1663317675";, "rel": "self"}, {"href": "http://192.168.1.101:8774/flavors/1663317675";, "rel": "bookmark"}], "ram": 512, "ephemeral": "", "disabled": false, "vcpus": 1, "swap": "", "os-flavor-access:is_public": true, "rxtx_factor": 1.0, "disk": 10, "id": "1663317675"}} _log_response /opt/stack/tempest/tempest/common/rest_client.py:314

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