← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1577378] [NEW] not set 413 as expected return error for server-metadata

 

Public bug reported:

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}}

** Affects: nova
     Importance: Low
     Assignee: jichenjc (jichenjc)
         Status: In Progress


** Tags: api

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

** Changed in: nova
     Assignee: (unassigned) => jichenjc (jichenjc)

** Tags added: api

-- 
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):
  In Progress

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


Follow ups