Activity log for bug #1582911

Date Who What changed Old value New value Message
2016-05-17 21:15:43 Mike Dorman bug added bug
2016-05-17 21:16:42 Mike Dorman description Description =========== When moving to the relaxed validation [1] implementation of the v2 API under the v2.1 code base, a 'nova boot' request with "user_data": null fails with the error: Returning 400 to user: Invalid input for field/attribute user_data. Value: None. None is not of type 'string' Under the legacy v2 code base, such a request is allowed. Steps to reproduce ================== Using the legacy v2 code base under Liberty, make a nova boot call using the following json payload: { "server": { "name": "mgdlibertyBBC", "flavorRef": "1", "imageRef": "626ce751-744f-4830-9d38-5e9e4f70fe3f", "user_data": null, "metadata": { "created_by": "mdorman" }, "security_groups": [ { "name": "default" } ], "availability_zone": "glbt1-dev-lab-zone-1,glbt1-dev-lab-zone-2,", "key_name": "lm126135-mdorm" } } The request succeeds and the instance is created. However, using the v2 implementation from the v2.1 code base with the same json payload fails: 2016-05-17 12:47:02.336 18296 DEBUG nova.api.openstack.wsgi [req-6d5d4100-7c0c-4ffa-a40c-4a086a473293 mdorman 40e94f951b704545885bdaa987a25154 - - -] Returning 400 to user: Invalid input for field/attribute user_data. Value: None. None is not of type 'string' __call__ /usr/lib/python2.7/site-packages/nova/api/openstack/wsgi.py:1175 Expected result =============== The behavior of the v2 API in the v2.1 code base should be exactly the same as the legacy v2 code base. Actual result ============= Request fails under v2.1 code base, but succeeds under legacy v2 code base. Environment =========== Liberty, from stable/liberty branch on 4/13/2016. Latest commit 6fdf1c87b1149e8b395eaa9f4cbf27263cf96ac6 Logs & Configs ============== Paste config used for legacy v2 code base (request succeeds): [composite:osapi_compute] use = call:nova.api.openstack.urlmap:urlmap_factory /v1.1: openstack_compute_api_legacy_v2 /v2: openstack_compute_api_legacy_v2 /v2.1: openstack_compute_api_v21 Paste config used for v2.1 code base (request fails): [composite:osapi_compute] use = call:nova.api.openstack.urlmap:urlmap_factory /: oscomputeversions /v1.1: openstack_compute_api_v21_legacy_v2_compatible /v2: openstack_compute_api_v21_legacy_v2_compatible /v2.1: openstack_compute_api_v21 [1] http://specs.openstack.org/openstack/nova-specs/specs/liberty/implemented/api-relax-validation.html Description =========== When moving to the relaxed validation [1] implementation of the v2 API under the v2.1 code base, a 'nova boot' request with "user_data": null fails with the error: Returning 400 to user: Invalid input for field/attribute user_data. Value: None. None is not of type 'string' Under the legacy v2 code base, such a request is allowed. Steps to reproduce ================== Using the legacy v2 code base under Liberty, make a nova boot call using the following json payload: { "server": { "name": "mgdlibertyBBC", "flavorRef": "1", "imageRef": "626ce751-744f-4830-9d38-5e9e4f70fe3f", "user_data": null, "metadata": { "created_by": "mdorman" }, "security_groups": [ { "name": "default" } ], "availability_zone": "glbt1-dev-lab-zone-1,glbt1-dev-lab-zone-2,", "key_name": "lm126135-mdorm" } } The request succeeds and the instance is created. However, using the v2 implementation from the v2.1 code base with the same json payload fails: 2016-05-17 12:47:02.336 18296 DEBUG nova.api.openstack.wsgi [req-6d5d4100-7c0c-4ffa-a40c-4a086a473293 mdorman 40e94f951b704545885bdaa987a25154 - - -] Returning 400 to user: Invalid input for field/attribute user_data. Value: None. None is not of type 'string' __call__ /usr/lib/python2.7/site-packages/nova/api/openstack/wsgi.py:1175 Expected result =============== The behavior of the v2 API in the v2.1 code base should be exactly the same as the legacy v2 code base. Actual result ============= Request fails under v2.1 code base, but succeeds under legacy v2 code base. Environment =========== Liberty, 12.0.3 tag (stable/liberty branch on 4/13/2016. Latest commit 6fdf1c87b1149e8b395eaa9f4cbf27263cf96ac6) Logs & Configs ============== Paste config used for legacy v2 code base (request succeeds): [composite:osapi_compute] use = call:nova.api.openstack.urlmap:urlmap_factory /v1.1: openstack_compute_api_legacy_v2 /v2: openstack_compute_api_legacy_v2 /v2.1: openstack_compute_api_v21 Paste config used for v2.1 code base (request fails): [composite:osapi_compute] use = call:nova.api.openstack.urlmap:urlmap_factory /: oscomputeversions /v1.1: openstack_compute_api_v21_legacy_v2_compatible /v2: openstack_compute_api_v21_legacy_v2_compatible /v2.1: openstack_compute_api_v21 [1] http://specs.openstack.org/openstack/nova-specs/specs/liberty/implemented/api-relax-validation.html
2016-05-18 07:11:48 Belmiro Moreira bug added subscriber Belmiro Moreira
2016-05-18 21:02:18 Matt Riedemann tags api
2016-05-18 21:02:52 Matt Riedemann tags api api liberty-backport-potential
2016-05-18 21:13:07 Matt Riedemann summary Relaxed validation for v2 doesn't accept null for user_data like legacy v2 does Relaxed validation for v2 doesn't accept null for user_data like legacy v2 does (liberty)
2016-05-18 21:26:05 Matt Riedemann nova: status New Confirmed
2016-05-18 21:26:11 Matt Riedemann nominated for series nova/mitaka
2016-05-18 21:26:11 Matt Riedemann bug task added nova/mitaka
2016-05-18 21:26:11 Matt Riedemann nominated for series nova/liberty
2016-05-18 21:26:11 Matt Riedemann bug task added nova/liberty
2016-05-18 21:26:21 Matt Riedemann nova: importance Undecided High
2016-05-18 21:26:25 Matt Riedemann nova/liberty: importance Undecided High
2016-05-18 21:26:27 Matt Riedemann nova/mitaka: importance Undecided High
2016-05-18 21:26:30 Matt Riedemann nova/liberty: status New Confirmed
2016-05-18 21:26:32 Matt Riedemann nova/mitaka: status New Confirmed
2016-05-19 02:40:55 Alex Xu nova: assignee Alex Xu (xuhj)
2016-05-19 05:29:20 OpenStack Infra nova: status Confirmed In Progress
2016-05-29 22:33:15 OpenStack Infra nova: status In Progress Fix Released
2016-06-01 15:02:41 OpenStack Infra nova/mitaka: status Confirmed In Progress
2016-06-01 15:02:41 OpenStack Infra nova/mitaka: assignee Matt Riedemann (mriedem)
2016-06-01 15:30:23 OpenStack Infra nova/liberty: status Confirmed In Progress
2016-06-01 15:30:23 OpenStack Infra nova/liberty: assignee Matt Riedemann (mriedem)
2016-06-02 18:02:51 OpenStack Infra nova/mitaka: status In Progress Fix Committed
2016-06-02 18:07:52 OpenStack Infra nova/liberty: status In Progress Fix Committed
2017-06-16 12:15:46 Sean Dague nova/liberty: status Fix Committed Fix Released
2017-06-16 17:41:56 Sean Dague nova/mitaka: status Fix Committed Fix Released