← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1154764] Re: Block Device Mapping is invalid when booting from volume

 

Vish, guys,

It turns out it was a pas pipeline issue... this bug is invalid

** Changed in: nova
       Status: Incomplete => Invalid

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

Title:
  Block Device Mapping is invalid when booting from volume

Status in OpenStack Compute (Nova):
  Invalid

Bug description:
  boot from volume is broken post g3.  This method of booting works on
  g3 from ubuntu-cloud-archive but is broken in trunk

  1. clone a volume (with cinder create --source-volid) 
  2. boot the new volume (nova boot --block-device-mapping)

  Now in trunk, it returns an

  *** FROM THE NOVA CLIENT ***

  The volume is create successfully:

  root@ctrl01:~# cinder list
  +--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
  |                  ID                  |   Status  | Display Name | Size | Volume Type | Bootable | Attached to |
  +--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
  | b83b6fdf-eab2-49b8-ab12-a7cef5cfb431 | available |    CentOS    |  50  |     None    |   true   |             |
  | c5397301-d464-44b2-9899-29ac367d4c23 | available |    bfv2.0    |  50  |     None    |   true   |             |
  +--------------------------------------+-----------+--------------+------+-------------+----------+-------------+

  but when trying to instantiate:

  root@ctrl01:~# nova boot --flavor 1 --block-device-mapping vda=c5397301-d464-44b2-9899-29ac367d4c23:::1 --nic net-id=e2b433af-e28b-4663-9d36-87df30872761 test
  ERROR: Block Device Mapping is Invalid: failed to get volume c5397301-d464-44b2-9899-29ac367d4c23. (HTTP 400) (Request-ID: req-39507bda-b523-4437-87c3-0882b70a54d1)

  *** complete debug from the nova boot command:

  oot@ctrl01:~# nova --debug boot --flavor 1 --block-device-mapping
  vda=c5397301-d464-44b2-9899-29ac367d4c23:::1 --nic net-id=e2b433af-
  e28b-4663-9d36-87df30872761 test

  REQ: curl -i http://172.20.90.113:5000/v2.0/tokens -X POST -H
  "Content-Type: application/json" -H "Accept: application/json" -H
  "User-Agent: python-novaclient" -d '{"auth": {"tenantName": "admin",
  "passwordCredentials": {"username": "admin", "password":
  "PASSWORD"}}}'

  RESP: [200] {'date': 'Wed, 13 Mar 2013 20:00:13 GMT', 'transfer-encoding': 'chunked', 'content-type': 'application/json', 'vary': 'X-Auth-Token'}
  RESP BODY: {"access": {"token": {"issued_at": "2013-03-13T20:00:13.560322", "expires": "2013-03-14T20:00:13Z", "id": "5bdcf2abbdc04398a7891a2ab68d8221", "tenant": {"description": null, "enabled": true, "id": "8b5b4435611c466dbf1479010881ee57", "name": "admin"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://172.20.90.113:8774/v1.1/8b5b4435611c466dbf1479010881ee57";, "region": "testcloud", "publicURL": "http://172.20.90.113:8774/v1.1/8b5b4435611c466dbf1479010881ee57";, "internalURL": "http://172.20.90.113:8774/v1.1/8b5b4435611c466dbf1479010881ee57"}], "endpoints_links": [], "type": "compute", "name": "Compute Service"}, {"endpoints": [{"adminURL": "http://172.20.90.113:9696";, "region": "testcloud", "publicURL": "http://172.20.90.113:9696";, "internalURL": "http://172.20.90.113:9696"}], "endpoints_links": [], "type": "network", "name": "Network Service"}, {"endpoints": [{"adminURL": "http://172.20.90.113:9292";, "region": "testcloud", "publicURL": "http://172.20.90.113:9292";, "internalURL": "http://172.20.90.113:9292"}], "endpoints_links": [], "type": "image", "name": "Image Service"}, {"endpoints": [{"adminURL": "http://172.20.90.113:8776/v1/8b5b4435611c466dbf1479010881ee57";, "region": "testcloud", "publicURL": "http://172.20.90.113:8776/v1/8b5b4435611c466dbf1479010881ee57";, "internalURL": "http://172.20.90.113:8776/v1/8b5b4435611c466dbf1479010881ee57"}], "endpoints_links": [], "type": "volume", "name": "Volume Service"}, {"endpoints": [{"adminURL": "http://172.20.90.113:8773/services/Admin";, "region": "testcloud", "publicURL": "http://172.20.90.113:8773/services/Cloud";, "internalURL": "http://172.20.90.113:8773/services/Cloud"}], "endpoints_links": [], "type": "ec2", "name": "EC2 Service"}, {"endpoints": [{"adminURL": "http://172.20.90.113:35357/v2.0";, "region": "testcloud", "publicURL": "http://172.20.90.113:5000/v2.0";, "internalURL": "http://172.20.90.113:5000/v2.0"}], "endpoints_links": [], "type": "identity", "name": "Identity Service"}], "user": {"username": "admin", "roles_links": [], "id": "05a92f441d4a4d39873f3405fdbb8f85", "roles": [{"name": "KeystoneServiceAdmin"}, {"name": "admin"}, {"name": "KeystoneAdmin"}], "name": "admin"}, "metadata": {"is_admin": 0, "roles": ["69e9d3c0c5c04175bbdd48a9ae640518", "c023d43749c8419091f3a2efb198c6dd", "93d810a6cf344f00aeea7745770033bd"]}}}

  
  REQ: curl -i http://172.20.90.113:8774/v1.1/8b5b4435611c466dbf1479010881ee57/flavors/1 -X GET -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: 5bdcf2abbdc04398a7891a2ab68d8221"

  RESP: [200] {'date': 'Wed, 13 Mar 2013 20:00:13 GMT', 'x-compute-request-id': 'req-a1116d20-d858-400d-ac77-b9e83406a7e1', 'content-type': 'application/json', 'content-length': '426'}
  RESP BODY: {"flavor": {"name": "m1.tiny", "links": [{"href": "http://172.20.90.113:8774/v1.1/8b5b4435611c466dbf1479010881ee57/flavors/1";, "rel": "self"}, {"href": "http://172.20.90.113:8774/8b5b4435611c466dbf1479010881ee57/flavors/1";, "rel": "bookmark"}], "ram": 512, "OS-FLV-DISABLED:disabled": false, "vcpus": 1, "swap": "", "os-flavor-access:is_public": true, "rxtx_factor": 1.0, "OS-FLV-EXT-DATA:ephemeral": 0, "disk": 0, "id": "1"}}

  
  REQ: curl -i http://172.20.90.113:8774/v1.1/8b5b4435611c466dbf1479010881ee57/os-volumes_boot -X POST -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 5bdcf2abbdc04398a7891a2ab68d8221" -d '{"server": {"name": "test", "imageRef": "", "block_device_mapping": [{"volume_size": "", "volume_id": "c5397301-d464-44b2-9899-29ac367d4c23", "delete_on_termination": "1", "device_name": "vda"}], "flavorRef": "1", "max_count": 1, "min_count": 1, "networks": [{"uuid": "e2b433af-e28b-4663-9d36-87df30872761"}]}}'

  RESP: [400] {'date': 'Wed, 13 Mar 2013 20:00:14 GMT', 'content-length': '135', 'content-type': 'application/json; charset=UTF-8', 'x-compute-request-id': 'req-2438260e-dcaf-4460-89ea-fa75a0a1cb20'}
  RESP BODY: {"badRequest": {"message": "Block Device Mapping is Invalid: failed to get volume c5397301-d464-44b2-9899-29ac367d4c23.", "code": 400}}

  DEBUG (shell:745) Block Device Mapping is Invalid: failed to get volume c5397301-d464-44b2-9899-29ac367d4c23. (HTTP 400) (Request-ID: req-2438260e-dcaf-4460-89ea-fa75a0a1cb20)
  Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 742, in main
      OpenStackComputeShell().main(map(strutils.safe_decode, sys.argv[1:]))
    File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 678, in main
      args.func(self.cs, args)
    File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/shell.py", line 282, in do_boot
      server = cs.servers.create(*boot_args, **boot_kwargs)
    File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/servers.py", line 609, in create
      **boot_kwargs)
    File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/base.py", line 163, in _boot
      return_raw=return_raw, **kwargs)
    File "/usr/lib/python2.7/dist-packages/novaclient/base.py", line 145, in _create
      _resp, body = self.api.client.post(url, body=body)
    File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 230, in post
      return self._cs_request(url, 'POST', **kwargs)
    File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 214, in _cs_request
      **kwargs)
    File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 196, in _time_request
      resp, body = self.request(url, method, **kwargs)
    File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 190, in request
      raise exceptions.from_response(resp, body, url, method)
  BadRequest: Block Device Mapping is Invalid: failed to get volume c5397301-d464-44b2-9899-29ac367d4c23. (HTTP 400) (Request-ID: req-2438260e-dcaf-4460-89ea-fa75a0a1cb20)
  ERROR: Block Device Mapping is Invalid: failed to get volume c5397301-d464-44b2-9899-29ac367d4c23. (HTTP 400) (Request-ID: req-2438260e-dcaf-4460-89ea-fa75a0a1cb20)



  *** FROM THE NOVA-API LOG ***

  2013-03-13 15:51:56 DEBUG nova.api.openstack.wsgi  Action: 'create', body: {"server": {"name": "test-post", "imageRef": "", "block_device_mapping": [{"volume_size": "", "volume_id": "c5397301-d464-44b2-9899-29ac367d4c23", "delete_on_termination": "1", "device_name": "vda"}], "flavorRef": "1", "user_data": "IyB0aGlzIGlzIHNvbWUgdXNlciBkYXRhCnJtIC90bXAvZG93bgp0b3VjaCAvdG1wL2Rvd24K", "max_count": 1, "min_count": 1, "networks": [{"uuid": "e2b433af-e28b-4663-9d36-87df30872761"}], "config_drive": true}} _process_stack /usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py:923
  2013-03-13 15:51:56 DEBUG nova.api.openstack.wsgi  Calling method <bound method Controller.create of <nova.api.openstack.compute.servers.Controller object at 0x3bd07d0>> _process_stack /usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py:924
  2013-03-13 15:51:56 DEBUG nova.quota  Created reservations ['b6873493-677d-479c-88cd-3c08503fca97', 'f9600e03-7e45-4be1-9696-607b4b94e2f3', 'f46a9cdf-8ee7-46bf-9e3d-f1d3fb3a5472'] reserve /usr/lib/python2.7/dist-packages/nova/quota.py:962
  2013-03-13 15:51:56 DEBUG nova.network.quantumv2.api  validate_networks() for [(u'e2b433af-e28b-4663-9d36-87df30872761', None, None)] validate_networks /usr/lib/python2.7/dist-packages/nova/network/quantumv2/api.py:432
  2013-03-13 15:51:56 DEBUG nova.compute.api  Going to run 1 instances... _validate_and_provision_instance /usr/lib/python2.7/dist-packages/nova/compute/api.py:603
  2013-03-13 15:51:56 DEBUG nova.compute.api [instance: 75a34ee4-ae65-417f-ba25-cf4774660af0]  block_device_mapping [{u'volume_size': u'', u'device_name': u'vda', u'delete_on_termination': True, u'volume_id': u'c5397301-d464-44b2-9899-29ac367d4c23'}] _update_block_device_mapping /usr/lib/python2.7/dist-packages/nova/compute/api.py:744
  2013-03-13 15:51:56 DEBUG nova.quota  Rolled back reservations ['b6873493-677d-479c-88cd-3c08503fca97', 'f9600e03-7e45-4be1-9696-607b4b94e2f3', 'f46a9cdf-8ee7-46bf-9e3d-f1d3fb3a5472'] rollback /usr/lib/python2.7/dist-packages/nova/quota.py:1008
  2013-03-13 15:51:56 INFO nova.osapi_compute.wsgi.server  172.20.90.113 "POST /v1.1/8b5b4435611c466dbf1479010881ee57/os-volumes_boot HTTP/1.1" status: 400 len: 321 time: 0.7152932


  So basically a 400 on the /os-volumes_boot call, note that the volume
  size is empty in the JSON requests but manually setting it to its real
  value does not change anything...

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