← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1648324] [NEW] When cross_az_attach set to false and creating VM with bootable volumes created before, InvalidBDM error raised.

 

Public bug reported:

Description
===========

When cross_az_attach option is set to False and you try to boot an
instance with bootable volume created before, InvalidBDM error raised.

Steps to reproduce
==================

1. Configure multiple AZs in Nova and Cinder.
  - for Nova : AZ1 and AZ2
  - for Cinder : AZ1 and AZ2

2. cross_az_attach set to false in nova.conf
[cinder]
cross_az_attach = False

3. Restart nova-compute service

4. Create volume from glance image
$ cinder create 10 --display-name test-bootable-volume --image-id {image-id} --availability-zone AZ1

5. Create instance from the volume created
$ nova boot --flavor m1.small --boot-volume 7c15ae47-12bd-41e7-822d-37e3619082be --nic net-id=1493b02c-c257-45db-84ea-789f87ed7924 --availability-zone AZ1 demo-instance

Expected result
===============

Instance is booted successfully in AZ1 zone.

Actual result
=============

Instance failed to boot and raise InvalidBDM Error

nova command output says:

ERROR (BadRequest): Block Device Mapping is Invalid: failed to get
volume 7c15ae47-12bd-41e7-822d-37e3619082be . (HTTP 400) (Request-ID:
req-8c36c5d1-b18d-4db5-a86f-db33c621e4e4)

nova-api.log says:

2016-12-02 20:02:48.724 150051 DEBUG cinderclient.client [req-8356085e-2594-4086-808e-42faba6b5ed2 22e5c7efda0345e3b4326946b8e8dc53 579e9f03f761431dbe194c8cf2baeed9 - default default] GET call to cinderv2 for http://10.161.32.13:8776/v2/579e9f03f761431dbe194c8cf2baeed9/volumes/7c15ae47-12bd-41e7-822d-37e3619082be used request id req-4f4170af-bc29-4b92-9c7d-c9a5ce457aa8 _log_request_id /usr/local/lib/python2.7/dist-packages/cinderclient/client.py:95
2016-12-02 20:02:48.734 150051 DEBUG nova.quota [req-8356085e-2594-4086-808e-42faba6b5ed2 22e5c7efda0345e3b4326946b8e8dc53 579e9f03f761431dbe194c8cf2baeed9 - default default] Rolled back reservations [u'ff856b75-4457-4b23-abe6-cf5981cacab8', u'74271baa-3385-4a03-bb99-86d05e30846c', u'09c2f52f-8f1e-46bf-9876-96f5ef1cf553'] rollback /usr/local/lib/python2.7/dist-packages/nova/quota.py:1427
2016-12-02 20:02:48.734 150051 INFO nova.api.openstack.wsgi [req-8356085e-2594-4086-808e-42faba6b5ed2 22e5c7efda0345e3b4326946b8e8dc53 579e9f03f761431dbe194c8cf2baeed9 - default default] HTTP exception thrown: Block Device Mapping is Invalid: failed to get volume 7c15ae47-12bd-41e7-822d-37e3619082be.
2016-12-02 20:02:48.735 150051 DEBUG nova.api.openstack.wsgi [req-8356085e-2594-4086-808e-42faba6b5ed2 22e5c7efda0345e3b4326946b8e8dc53 579e9f03f761431dbe194c8cf2baeed9 - default default] Returning 400 to user: Block Device Mapping is Invalid: failed to get volume 7c15ae47-12bd-41e7-822d-37e3619082be. __call__ /usr/local/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py:1044
2016-12-02 20:02:48.736 150051 INFO nova.osapi_compute.wsgi.server [req-8356085e-2594-4086-808e-42faba6b5ed2 22e5c7efda0345e3b4326946b8e8dc53 579e9f03f761431dbe194c8cf2baeed9 - default default] 10.161.32.13 "POST /v2.1/579e9f03f761431dbe194c8cf2baeed9/os-volumes_boot HTTP/1.1" status: 400 len: 494 time: 0.4048491


Environment
===========

Ubuntu 16.04, qemu, Cinder ceph
Nova version: stable/newton
Two AZs configured in Nova and Cinder

** 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/1648324

Title:
  When cross_az_attach set to false and creating VM with bootable
  volumes created before, InvalidBDM error raised.

Status in OpenStack Compute (nova):
  New

Bug description:
  Description
  ===========

  When cross_az_attach option is set to False and you try to boot an
  instance with bootable volume created before, InvalidBDM error raised.

  Steps to reproduce
  ==================

  1. Configure multiple AZs in Nova and Cinder.
    - for Nova : AZ1 and AZ2
    - for Cinder : AZ1 and AZ2

  2. cross_az_attach set to false in nova.conf
  [cinder]
  cross_az_attach = False

  3. Restart nova-compute service

  4. Create volume from glance image
  $ cinder create 10 --display-name test-bootable-volume --image-id {image-id} --availability-zone AZ1

  5. Create instance from the volume created
  $ nova boot --flavor m1.small --boot-volume 7c15ae47-12bd-41e7-822d-37e3619082be --nic net-id=1493b02c-c257-45db-84ea-789f87ed7924 --availability-zone AZ1 demo-instance

  Expected result
  ===============

  Instance is booted successfully in AZ1 zone.

  Actual result
  =============

  Instance failed to boot and raise InvalidBDM Error

  nova command output says:

  ERROR (BadRequest): Block Device Mapping is Invalid: failed to get
  volume 7c15ae47-12bd-41e7-822d-37e3619082be . (HTTP 400) (Request-ID:
  req-8c36c5d1-b18d-4db5-a86f-db33c621e4e4)

  nova-api.log says:

  2016-12-02 20:02:48.724 150051 DEBUG cinderclient.client [req-8356085e-2594-4086-808e-42faba6b5ed2 22e5c7efda0345e3b4326946b8e8dc53 579e9f03f761431dbe194c8cf2baeed9 - default default] GET call to cinderv2 for http://10.161.32.13:8776/v2/579e9f03f761431dbe194c8cf2baeed9/volumes/7c15ae47-12bd-41e7-822d-37e3619082be used request id req-4f4170af-bc29-4b92-9c7d-c9a5ce457aa8 _log_request_id /usr/local/lib/python2.7/dist-packages/cinderclient/client.py:95
  2016-12-02 20:02:48.734 150051 DEBUG nova.quota [req-8356085e-2594-4086-808e-42faba6b5ed2 22e5c7efda0345e3b4326946b8e8dc53 579e9f03f761431dbe194c8cf2baeed9 - default default] Rolled back reservations [u'ff856b75-4457-4b23-abe6-cf5981cacab8', u'74271baa-3385-4a03-bb99-86d05e30846c', u'09c2f52f-8f1e-46bf-9876-96f5ef1cf553'] rollback /usr/local/lib/python2.7/dist-packages/nova/quota.py:1427
  2016-12-02 20:02:48.734 150051 INFO nova.api.openstack.wsgi [req-8356085e-2594-4086-808e-42faba6b5ed2 22e5c7efda0345e3b4326946b8e8dc53 579e9f03f761431dbe194c8cf2baeed9 - default default] HTTP exception thrown: Block Device Mapping is Invalid: failed to get volume 7c15ae47-12bd-41e7-822d-37e3619082be.
  2016-12-02 20:02:48.735 150051 DEBUG nova.api.openstack.wsgi [req-8356085e-2594-4086-808e-42faba6b5ed2 22e5c7efda0345e3b4326946b8e8dc53 579e9f03f761431dbe194c8cf2baeed9 - default default] Returning 400 to user: Block Device Mapping is Invalid: failed to get volume 7c15ae47-12bd-41e7-822d-37e3619082be. __call__ /usr/local/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py:1044
  2016-12-02 20:02:48.736 150051 INFO nova.osapi_compute.wsgi.server [req-8356085e-2594-4086-808e-42faba6b5ed2 22e5c7efda0345e3b4326946b8e8dc53 579e9f03f761431dbe194c8cf2baeed9 - default default] 10.161.32.13 "POST /v2.1/579e9f03f761431dbe194c8cf2baeed9/os-volumes_boot HTTP/1.1" status: 400 len: 494 time: 0.4048491

  
  Environment
  ===========

  Ubuntu 16.04, qemu, Cinder ceph
  Nova version: stable/newton
  Two AZs configured in Nova and Cinder

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