yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #50797
[Bug 1577378] Re: not set 413 as expected return error for server-metadata
Reviewed: https://review.openstack.org/311728
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=53a573963de6fc0fb20b5fbec835f4b4ed0dc384
Submitter: Jenkins
Branch: master
commit 53a573963de6fc0fb20b5fbec835f4b4ed0dc384
Author: jichenjc <jichenjc@xxxxxxxxxx>
Date: Sun Apr 24 19:51:51 2016 +0800
Remove 413 as expected error code
since the validation is already done in schema side, nova v2.1
API not check the metadata and will not raise InvalidMetaxxx
related exception, so no need to set 413 as excepted error code.
Change-Id: Ia91343620b22294a119666a81b7ae7b6e39352c9
Closes-Bug: 1577378
** Changed in: nova
Status: In Progress => 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/1577378
Title:
not set 413 as expected return error for server-metadata
Status in OpenStack Compute (nova):
Fix Released
Bug description:
https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/server_metadata.py#L76
has 413 as expected ouptut, however, it returns 400 now
DEBUG (session:225) REQ: curl -g -i -X POST http://192.168.122.105:8774/v2.1/611bfd117d714430ac2c927f7e50163c/servers/721a02a5-ba2c-49a3-9fd5-ddcaec487c62/metadata -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-OpenStack-Nova-API-Version: 2.18" -H "X-Auth-Token: {SHA1}6146a24b9fa44e7ce75e17d9ab0e8fefad71a075" -d '{"metadata": {"a": "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"}}'
DEBUG (connectionpool:387) "POST /v2.1/611bfd117d714430ac2c927f7e50163c/servers/721a02a5-ba2c-49a3-9fd5-ddcaec487c62/metadata HTTP/1.1" 400 625
DEBUG (session:254) RESP: [400] Content-Length: 625 X-Compute-Request-Id: req-12ce0390-16dc-45a5-98ed-9d704a24b1ff Vary: X-OpenStack-Nova-API-Version Connection: keep-alive X-Openstack-Nova-Api-Version: 2.18 Date: Mon, 02 May 2016 12:13:44 GMT Content-Type: application/json; charset=UTF-8
RESP BODY: {"badRequest": {"message": "Invalid input for field/attribute a. Value: 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890. u'12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890' is too long", "code": 400}}
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1577378/+subscriptions
References