← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1835042] [NEW] volume_type in create server not supported

 

Public bug reported:

Hey there,

as written in the docs[1] the field block_device_mapping_v2.volume_type
should be supported in microversions later than 2.67. However we have
microversion 2.72 but if we want to use the field we get an error, of
unsupported field:

Request
~~~~~~~
POST /v2.1/servers HTTP/1.1
User-Agent: GuzzleHttp/6.3.3 curl/7.58.0 PHP/7.2.10-0ubuntu0.18.04.1
Host: 10.20.254.70:8774
Content-Type: application/json

{"server":{"name":"volumeTestCompute4","flavorRef":"39681322-4481-47f2-9c40-75eb9d92da57","key_name":"hajo01","networks":[{"uuid":"e21ab8f0-7320-44c2-bf64-bae72b2dbc72"}],"block_device_mapping_v2":[{"uuid":"d626b970-0086-405c-a521-7cdc89943d52","device_name":"/dev/vda","destination_type":"volume","boot_index":0,"source_type":"image","volume_size":10,"volume_type":"hdd"}]}}

Response
~~~~~~~~
HTTP/1.1 400 Bad Request
Date: Tue, 02 Jul 2019 09:41:25 GMT
Server: Apache/2.4.29 (Ubuntu)
Content-Length: 345
OpenStack-API-Version: compute 2.1
X-OpenStack-Nova-API-Version: 2.1
Vary: OpenStack-API-Version,X-OpenStack-Nova-API-Version
x-openstack-request-id: req-c45b6f92-17a4-4fdd-9def-335b2358fd74
x-compute-request-id: req-c45b6f92-17a4-4fdd-9def-335b2358fd74
Connection: close
Content-Type: application/json; charset=UTF-8

{"badRequest": {"code": 400, "message": "Invalid input for
field/attribute 0. Value: {'uuid':
'd626b970-0086-405c-a521-7cdc89943d52', 'device_name': '/dev/vda',
'destination_type': 'volume', 'boot_index': 0, 'source_type': 'image',
'volume_size': 10, 'volume_type': 'hdd'}. Additional properties are not
allowed ('volume_type' was unexpected)"}}


Links:
[1] https://developer.openstack.org/api-ref/compute/?expanded=create-server-detail,show-details-of-specific-api-version-detail,list-all-major-versions-detail#create-server

** Affects: nova
     Importance: Undecided
         Status: New

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

Title:
  volume_type in create server not supported

Status in OpenStack Compute (nova):
  New

Bug description:
  Hey there,

  as written in the docs[1] the field
  block_device_mapping_v2.volume_type should be supported in
  microversions later than 2.67. However we have microversion 2.72 but
  if we want to use the field we get an error, of unsupported field:

  Request
  ~~~~~~~
  POST /v2.1/servers HTTP/1.1
  User-Agent: GuzzleHttp/6.3.3 curl/7.58.0 PHP/7.2.10-0ubuntu0.18.04.1
  Host: 10.20.254.70:8774
  Content-Type: application/json

  {"server":{"name":"volumeTestCompute4","flavorRef":"39681322-4481-47f2-9c40-75eb9d92da57","key_name":"hajo01","networks":[{"uuid":"e21ab8f0-7320-44c2-bf64-bae72b2dbc72"}],"block_device_mapping_v2":[{"uuid":"d626b970-0086-405c-a521-7cdc89943d52","device_name":"/dev/vda","destination_type":"volume","boot_index":0,"source_type":"image","volume_size":10,"volume_type":"hdd"}]}}

  Response
  ~~~~~~~~
  HTTP/1.1 400 Bad Request
  Date: Tue, 02 Jul 2019 09:41:25 GMT
  Server: Apache/2.4.29 (Ubuntu)
  Content-Length: 345
  OpenStack-API-Version: compute 2.1
  X-OpenStack-Nova-API-Version: 2.1
  Vary: OpenStack-API-Version,X-OpenStack-Nova-API-Version
  x-openstack-request-id: req-c45b6f92-17a4-4fdd-9def-335b2358fd74
  x-compute-request-id: req-c45b6f92-17a4-4fdd-9def-335b2358fd74
  Connection: close
  Content-Type: application/json; charset=UTF-8

  {"badRequest": {"code": 400, "message": "Invalid input for
  field/attribute 0. Value: {'uuid':
  'd626b970-0086-405c-a521-7cdc89943d52', 'device_name': '/dev/vda',
  'destination_type': 'volume', 'boot_index': 0, 'source_type': 'image',
  'volume_size': 10, 'volume_type': 'hdd'}. Additional properties are
  not allowed ('volume_type' was unexpected)"}}

  
  Links:
  [1] https://developer.openstack.org/api-ref/compute/?expanded=create-server-detail,show-details-of-specific-api-version-detail,list-all-major-versions-detail#create-server

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


Follow ups