← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1538197] [NEW] booting from volume throws http 500 if volume size is not specified

 

Public bug reported:

If a instance is booted from volume with an image to volume bdm where
the volume size is not specified nova throws http 500 instead of http
400.

Visible on master (b558d616c3b123dbe2a0914162b45765192f3a12) with
devstack.

To reproduce:

$ nova image-list
+--------------------------------------+---------------------------------+--------+--------+
| ID                                   | Name                            | Status | Server |
+--------------------------------------+---------------------------------+--------+--------+
| a7e6b974-0b5a-4d60-8d68-d4745aae9bb3 | cirros-0.3.4-x86_64-uec         | ACTIVE |        |
| 10672d57-30b3-4c41-9f5b-f42c030970fa | cirros-0.3.4-x86_64-uec-kernel  | ACTIVE |        |
| 70790401-6760-48d5-9bf4-175d18cfc9d6 | cirros-0.3.4-x86_64-uec-ramdisk | ACTIVE |        |
+--------------------------------------+---------------------------------+--------+--------+

$ nova boot --flavor 42 --block-device source=image,id=a7e6b974-0b5a-4d60-8d68-d4745aae9bb3,dest=volume,shutdown=preserve,bootindex=0 --poll vm1
ERROR (ClientException): Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'nova.exception.InvalidBDM'> (HTTP 500) (Request-ID: req-996d695a-3f36-48ee-b91f-567c3ab2f1ce)


There is a stack trace in the nova-api log:
2016-01-20 18:51:58.400 ERROR nova.api.openstack.extensions [req-996d695a-3f36-48ee-b91f-567c3ab2f1ce admin admin] Unexpected exception in API method
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions Traceback (most recent call last):
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/api/openstack/extensions.py", line 478, in wrapped
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     return f(*args, **kwargs)
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/api/validation/__init__.py", line 73, in wrapper
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     return func(*args, **kwargs)
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/api/validation/__init__.py", line 73, in wrapper
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     return func(*args, **kwargs)
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/api/openstack/compute/servers.py", line 604, in create
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     **create_kwargs)
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/hooks.py", line 149, in inner
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     rv = f(*args, **kwargs)
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 1504, in create
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     check_server_group_quota=check_server_group_quota)
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 1127, in _create_instance
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     instance_group, check_server_group_quota)
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 976, in _provision_instances
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     quotas.rollback()
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 204, in __exit__
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     six.reraise(self.type_, self.value, self.tb)
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 939, in _provision_instances
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     num_instances, i, shutdown_terminate)
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 1422, in create_db_entry_for_new_instance
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     instance.destroy()
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 204, in __exit__
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     six.reraise(self.type_, self.value, self.tb)
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 1418, in create_db_entry_for_new_instance
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     context, instance, instance_type, block_device_mapping)
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 1254, in _validate_bdm
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     raise exception.InvalidBDM(message=_("Images with "
2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions InvalidBDM: Images with destination_type 'volume' need to have a non-zero size specified

** Affects: nova
     Importance: Undecided
     Assignee: Balazs Gibizer (balazs-gibizer)
         Status: New

** Changed in: nova
     Assignee: (unassigned) => Balazs Gibizer (balazs-gibizer)

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

Title:
  booting from volume throws http 500 if volume size is not specified

Status in OpenStack Compute (nova):
  New

Bug description:
  If a instance is booted from volume with an image to volume bdm where
  the volume size is not specified nova throws http 500 instead of http
  400.

  Visible on master (b558d616c3b123dbe2a0914162b45765192f3a12) with
  devstack.

  To reproduce:

  $ nova image-list
  +--------------------------------------+---------------------------------+--------+--------+
  | ID                                   | Name                            | Status | Server |
  +--------------------------------------+---------------------------------+--------+--------+
  | a7e6b974-0b5a-4d60-8d68-d4745aae9bb3 | cirros-0.3.4-x86_64-uec         | ACTIVE |        |
  | 10672d57-30b3-4c41-9f5b-f42c030970fa | cirros-0.3.4-x86_64-uec-kernel  | ACTIVE |        |
  | 70790401-6760-48d5-9bf4-175d18cfc9d6 | cirros-0.3.4-x86_64-uec-ramdisk | ACTIVE |        |
  +--------------------------------------+---------------------------------+--------+--------+

  $ nova boot --flavor 42 --block-device source=image,id=a7e6b974-0b5a-4d60-8d68-d4745aae9bb3,dest=volume,shutdown=preserve,bootindex=0 --poll vm1
  ERROR (ClientException): Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
  <class 'nova.exception.InvalidBDM'> (HTTP 500) (Request-ID: req-996d695a-3f36-48ee-b91f-567c3ab2f1ce)

  
  There is a stack trace in the nova-api log:
  2016-01-20 18:51:58.400 ERROR nova.api.openstack.extensions [req-996d695a-3f36-48ee-b91f-567c3ab2f1ce admin admin] Unexpected exception in API method
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions Traceback (most recent call last):
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/api/openstack/extensions.py", line 478, in wrapped
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     return f(*args, **kwargs)
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/api/validation/__init__.py", line 73, in wrapper
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     return func(*args, **kwargs)
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/api/validation/__init__.py", line 73, in wrapper
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     return func(*args, **kwargs)
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/api/openstack/compute/servers.py", line 604, in create
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     **create_kwargs)
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/hooks.py", line 149, in inner
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     rv = f(*args, **kwargs)
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 1504, in create
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     check_server_group_quota=check_server_group_quota)
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 1127, in _create_instance
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     instance_group, check_server_group_quota)
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 976, in _provision_instances
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     quotas.rollback()
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 204, in __exit__
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     six.reraise(self.type_, self.value, self.tb)
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 939, in _provision_instances
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     num_instances, i, shutdown_terminate)
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 1422, in create_db_entry_for_new_instance
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     instance.destroy()
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 204, in __exit__
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     six.reraise(self.type_, self.value, self.tb)
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 1418, in create_db_entry_for_new_instance
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     context, instance, instance_type, block_device_mapping)
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 1254, in _validate_bdm
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions     raise exception.InvalidBDM(message=_("Images with "
  2016-01-20 18:51:58.400 TRACE nova.api.openstack.extensions InvalidBDM: Images with destination_type 'volume' need to have a non-zero size specified

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


Follow ups