← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1408954] Re: nova flavor-create return empty string when swap == 0

 

This is an automated cleanup. This bug report has been closed because it
is older than 18 months and there is no open code change to fix this.
After this time it is unlikely that the circumstances which lead to
the observed issue can be reproduced.

If you can reproduce the bug, please:
* reopen the bug report (set to status "New")
* AND add the detailed steps to reproduce the issue (if applicable)
* AND leave a comment "CONFIRMED FOR: <RELEASE_NAME>"
  Only still supported release names are valid (LIBERTY, MITAKA, OCATA, NEWTON).
  Valid example: CONFIRMED FOR: LIBERTY


** Changed in: nova
   Importance: Low => Undecided

** Changed in: nova
       Status: Confirmed => Expired

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

Title:
  nova flavor-create return empty string when swap == 0

Status in OpenStack Compute (nova):
  Expired

Bug description:
  The type of 'swap' is string or int according to 'swap' value in DB.
  swap == 0, return empty string.
  swap > 0, return int.
  The client code is complex when return value of API is not fixed type.
  On the other hand, the type of 'swap' in the request and response of flavor-create should be same type.

  DEBUG (session:169) REQ: curl -g -i -X POST http://10.250.10.29:8774/v2/e159961712f64b388b57062483d98a91/flavors -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}6ba0b4e647a5ca47937c48941ad361d02d4ff604" -d '{"flavor": {"vcpus": 1, "disk": 1, "name": "chenrui_f", "os-flavor-access:is_public": true, "rxtx_factor": 1.0, "OS-FLV-EXT-DATA:ephemeral": 0, "ram": 1, "id": "11", "swap": 0}}'
  INFO (connectionpool:188) Starting new HTTP connection (1): 10.250.10.29
  DEBUG (connectionpool:364) "POST /v2/e159961712f64b388b57062483d98a91/flavors HTTP/1.1" 200 425
  DEBUG (session:197) RESP: [200] date: Fri, 09 Jan 2015 09:36:44 GMT connection: keep-alive content-type: application/json content-length: 425 x-compute-request-id: req-df79ffc1-08ff-4569-945f-4fa2fdf49436
  RESP BODY: {"flavor": {"name": "chenrui_f", "links": [{"href": "http://10.250.10.29:8774/v2/e159961712f64b388b57062483d98a91/flavors/11";, "rel": "self"}, {"href": "http://10.250.10.29:8774/e159961712f64b388b57062483d98a91/flavors/11";, "rel": "bookmark"}], "ram": 1, "OS-FLV-DISABLED:disabled": false, "vcpus": 1, "swap": "", "os-flavor-access:is_public": true, "rxtx_factor": 1.0, "OS-FLV-EXT-DATA:ephemeral": 0, "disk": 1, "id": "11"}}

  mysql> select * from instance_types where flavorid=11;
  +---------------------+------------+------------+-----------+----+-----------+-------+------+-------------+----------+-------------+---------+--------------+----------+-----------+---------+
  | created_at          | updated_at | deleted_at | name      | id | memory_mb | vcpus | swap | vcpu_weight | flavorid | rxtx_factor | root_gb | ephemeral_gb | disabled | is_public | deleted |
  +---------------------+------------+------------+-----------+----+-----------+-------+------+-------------+----------+-------------+---------+--------------+----------+-----------+---------+
  | 2015-01-09 09:36:44 | NULL       | NULL       | chenrui_f |  9 |         1 |     1 |    0 |        NULL | 11       |           1 |       1 |            0 |        0 |         1 |       0 |
  +---------------------+------------+------------+-----------+----+-----------+-------+------+-------------+----------+-------------+---------+--------------+----------+-----------+---------+
  1 row in set (0.00 sec)

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


References