Activity log for bug #1056910

Date Who What changed Old value New value Message
2012-09-26 14:46:42 Rajalakshmi Ganesan bug added bug
2012-09-26 14:47:19 Rajalakshmi Ganesan description Description: -------------- We are unable to create Flavor when Optional parameters "swap", "os-flavor-access:is_public", "rxtx_factor", "OS-FLV-EXT-DATA:ephemeral" are not mentioned in the request body. Though the above mentioned paramters are optional, we get Bad Request on not giving these parameters in request body. Environment: -------------- Folsom Python Nova client output for help: --------------------------------------- rajalakshmi_ganesan@ubuntu:~$ nova help flavor-create usage: nova flavor-create [--ephemeral <ephemeral>] [--swap <swap>] [--rxtx-factor <factor>] [--is-public <is-public>] <name> <id> <ram> <disk> <vcpus> Create a new flavor Positional arguments: <name> Name of the new flavor <id> Unique integer ID for the new flavor <ram> Memory size in MB <disk> Disk size in GB <vcpus> Number of vcpus Optional arguments: --ephemeral <ephemeral> Ephemeral space size in GB (default 0) --swap <swap> Swap space size in MB (default 0) --rxtx-factor <factor> RX/TX factor (default 1) --is-public <is-public> Make flavor accessible to the public (default true) rajalakshmi_ganesan@ubuntu:~$ CURL COMMAND OUTPUTS: -------------------------------- 1. REQUEST WITHOUT OPTIONAL PARAMETERS rajalakshmi_ganesan@ubuntu:~$ curl -i http://15.184.64.226:8774/v2/25ecbf309f7748c6a173fabf2a673a65/flavors -X POST -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "X-Auth-Token: 0b78256729a848559f7a9a45e24ef554" -d '{"flavor": {"disk": 10, "vcpus": 2, "ram": 1024, "name": "flavor-122", "id": 122}}' HTTP/1.1 400 Bad Request Content-Length: 141 Content-Type: application/json; charset=UTF-8 X-Compute-Request-Id: req-2d7629b4-4ad5-4d50-9fb8-8bb032e4147f Date: Wed, 26 Sep 2012 14:23:19 GMT {"badRequest": {"message": "The server could not comply with the request since it is either malformed or otherwise incorrect.", "code": 400}}rajalakshmi_ganesan@ubuntu:~$ rajalakshmi_ganesan@ubuntu:~$ 2. REQUEST WITHOUT OPTIONAL PARAMETERS rajalakshmi_ganesan@ubuntu:~$ curl -i http://15.184.64.226:8774/v2/25ecbf309f7748c6a173fabf2a673a65/flavors -X POST -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "X-Auth-Token: 0b78256729a848559f7a9a45e24ef554" -d '{"flavor": {"disk": 10, "vcpus": 2, "ram": 1024, "name": "PS_flavor", "id": 333, "swap": 22, "os-flavor-access:is_public": true, "rxtx_factor": 2, "OS-FLV-EXT-DATA:ephemeral": 2}}' HTTP/1.1 200 OK X-Compute-Request-Id: req-36287256-1c99-4939-a72b-be741b8fcf63 Content-Type: application/json Content-Length: 432 Date: Wed, 26 Sep 2012 14:28:12 GMT {"flavor": {"name": "PS_flavor", "links": [{"href": "http://15.184.64.226:8774/v2/25ecbf309f7748c6a173fabf2a673a65/flavors/333", "rel": "self"}, {"href": "http://15.184.64.226:8774/25ecbf309f7748c6a173fabf2a673a65/flavors/333", "rel": "bookmark"}], "ram": 1024, "OS-FLV-DISABLED:disabled": false, "vcpus": 2, "swap": 22, "os-flavor-access:is_public": true, "rxtx_factor": 2, "OS-FLV-EXT-DATA:ephemeral": 2, "disk": 10, "id": "333"}}rajalakshmi_ganesan@ubuntu:~$ nova flavor-list +-----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+ | ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | extra_specs | +-----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+ | 1 | m1.tiny | 512 | 0 | 0 | | 1 | 1.0 | True | {} | | 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0 | True | {} | | 3 | m1.medium | 4096 | 40 | 0 | | 2 | 1.0 | True | {} | | 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0 | True | {} | | 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0 | True | {} | | 12 | flavor-12 | 1024 | 10 | 2 | 512 | 2 | 1.0 | True | {} | | 333 | PS_flavor | 1024 | 10 | 2 | 22 | 2 | 2.0 | True | {} | +-----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+ Description: -------------- We are unable to create Flavor when Optional parameters "swap", "os-flavor-access:is_public", "rxtx_factor", "OS-FLV-EXT-DATA:ephemeral" are not mentioned in the request body. Though the above mentioned paramters are optional, we get Bad Request on not giving these parameters in request body. Environment: -------------- Folsom Python Nova client output for help: --------------------------------------- rajalakshmi_ganesan@ubuntu:~$ nova help flavor-create usage: nova flavor-create [--ephemeral <ephemeral>] [--swap <swap>]                           [--rxtx-factor <factor>] [--is-public <is-public>]                           <name> <id> <ram> <disk> <vcpus> Create a new flavor Positional arguments:   <name> Name of the new flavor   <id> Unique integer ID for the new flavor   <ram> Memory size in MB   <disk> Disk size in GB   <vcpus> Number of vcpus Optional arguments:   --ephemeral <ephemeral>                         Ephemeral space size in GB (default 0)   --swap <swap> Swap space size in MB (default 0)   --rxtx-factor <factor>                         RX/TX factor (default 1)   --is-public <is-public>                         Make flavor accessible to the public (default true) rajalakshmi_ganesan@ubuntu:~$ CURL COMMAND OUTPUTS: -------------------------------- 1. REQUEST WITHOUT OPTIONAL PARAMETERS rajalakshmi_ganesan@ubuntu:~$ curl -i http://15.184.64.226:8774/v2/25ecbf309f7748c6a173fabf2a673a65/flavors -X POST -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "X-Auth-Token: 0b78256729a848559f7a9a45e24ef554" -d '{"flavor": {"disk": 10, "vcpus": 2, "ram": 1024, "name": "flavor-122", "id": 122}}' HTTP/1.1 400 Bad Request Content-Length: 141 Content-Type: application/json; charset=UTF-8 X-Compute-Request-Id: req-2d7629b4-4ad5-4d50-9fb8-8bb032e4147f Date: Wed, 26 Sep 2012 14:23:19 GMT {"badRequest": {"message": "The server could not comply with the request since it is either malformed or otherwise incorrect.", "code": 400}}rajalakshmi_ganesan@ubuntu:~$ rajalakshmi_ganesan@ubuntu:~$ 2. REQUEST WITH OPTIONAL PARAMETERS rajalakshmi_ganesan@ubuntu:~$ curl -i http://15.184.64.226:8774/v2/25ecbf309f7748c6a173fabf2a673a65/flavors -X POST -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "X-Auth-Token: 0b78256729a848559f7a9a45e24ef554" -d '{"flavor": {"disk": 10, "vcpus": 2, "ram": 1024, "name": "PS_flavor", "id": 333, "swap": 22, "os-flavor-access:is_public": true, "rxtx_factor": 2, "OS-FLV-EXT-DATA:ephemeral": 2}}' HTTP/1.1 200 OK X-Compute-Request-Id: req-36287256-1c99-4939-a72b-be741b8fcf63 Content-Type: application/json Content-Length: 432 Date: Wed, 26 Sep 2012 14:28:12 GMT {"flavor": {"name": "PS_flavor", "links": [{"href": "http://15.184.64.226:8774/v2/25ecbf309f7748c6a173fabf2a673a65/flavors/333", "rel": "self"}, {"href": "http://15.184.64.226:8774/25ecbf309f7748c6a173fabf2a673a65/flavors/333", "rel": "bookmark"}], "ram": 1024, "OS-FLV-DISABLED:disabled": false, "vcpus": 2, "swap": 22, "os-flavor-access:is_public": true, "rxtx_factor": 2, "OS-FLV-EXT-DATA:ephemeral": 2, "disk": 10, "id": "333"}}rajalakshmi_ganesan@ubuntu:~$ nova flavor-list +-----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+ | ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | extra_specs | +-----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+ | 1 | m1.tiny | 512 | 0 | 0 | | 1 | 1.0 | True | {} | | 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0 | True | {} | | 3 | m1.medium | 4096 | 40 | 0 | | 2 | 1.0 | True | {} | | 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0 | True | {} | | 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0 | True | {} | | 12 | flavor-12 | 1024 | 10 | 2 | 512 | 2 | 1.0 | True | {} | | 333 | PS_flavor | 1024 | 10 | 2 | 22 | 2 | 2.0 | True | {} | +-----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
2012-10-18 20:26:59 Sathish Nagappan nova: assignee Sathish Nagappan (sathish-nagappan)
2012-10-18 22:18:03 OpenStack Infra nova: status New In Progress
2012-10-22 20:33:09 OpenStack Infra nova: status In Progress Fix Committed
2012-11-21 10:01:33 Thierry Carrez nova: status Fix Committed Fix Released
2012-11-21 10:01:33 Thierry Carrez nova: milestone grizzly-1
2013-04-04 11:00:44 Thierry Carrez nova: milestone grizzly-1 2013.1