← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1496235] Re: Boot from volume faild with availability_zone option, in case of cinder do not have availability_zone

 

I assume this is the call that fails, right?

https://github.com/openstack/nova/blob/master/nova/virt/block_device.py#L381

            vol = volume_api.create(context, self.volume_size,
                                    '', '', image_id=self.image_id,
                                    availability_zone=av_zone)

And since that az2 doesn't exist in cinder, the volume create request
fails.  I guess I wouldn't consider this a bug.

We could probably determine from the az list in cinder if the volume
we're about to create with the given AZ exists, but if it doesn't, then
what do we do?  We can either fail (which we're already doing), or not
send in the AZ to cinder, but I'm not sure if that's what should happen
- although in talking with the cinder devs it sounds like AZs aren't
really used in cinder anyway.

** Changed in: nova
       Status: New => 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/1496235

Title:
  Boot from volume faild with availability_zone option, in case of
  cinder do not have availability_zone

Status in OpenStack Compute (nova):
  Invalid

Bug description:
  My envirement ,Nova has 2 availability_zone and Cinder has no availability_zone.
  When I run two command "cinder create" and "nova boot" separately ,  it is finished normally.
  But run at one time, and an error occurs as below.(It is the same on the dashboard)

  ----
  $ nova boot --flavor m1.small --block-device source=image,id=4014a3f7-507b-4692-86c8-8224bbcc7102,dest=volume,size=10,shutdown=delete,bootindex=0 --nic net-id=4d9e9847-80b5-46ca-8439-344930a59825 --availability_zone az2 test1

  $ nova list
  +--------------------------------------+-------+--------+----------------------+-------------+-----------------------+
  | ID                                   | Name  | Status | Task State           | Power State | Networks              |
  +--------------------------------------+-------+--------+----------------------+-------------+-----------------------+
  | a0dc0f03-155c-422b-b0ac-996fc17e0989 | test1 | ERROR  | block_device_mapping | NOSTATE     |                       |
  +--------------------------------------+-------+--------+----------------------+-------------+-----------------------+

  $ nova show
  +--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  | Property                             | Value                                                                                                                                                                                                                                                |
  +--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  | OS-DCF:diskConfig                    | MANUAL                                                                                                                                                                                                                                               |
  | OS-EXT-AZ:availability_zone          | az1                                                                                                                                                                                                                                                  |
  | OS-EXT-SRV-ATTR:host                 | compute011-az1                                                                                                                                                                                                                              |
  | OS-EXT-SRV-ATTR:hypervisor_hostname  | compute011-az1.maas                                                                                                                                                                                                                         |
  | OS-EXT-SRV-ATTR:instance_name        | instance-00000514                                                                                                                                                                                                                                    |
  | OS-EXT-STS:power_state               | 0                                                                                                                                                                                                                                                    |
  | OS-EXT-STS:task_state                | block_device_mapping                                                                                                                                                                                                                                 |
  | OS-EXT-STS:vm_state                  | error                                                                                                                                                                                                                                                |
  | OS-SRV-USG:launched_at               | -                                                                                                                                                                                                                                                    |
  | OS-SRV-USG:terminated_at             | -                                                                                                                                                                                                                                                    |
  | accessIPv4                           |                                                                                                                                                                                                                                                      |
  | accessIPv6                           |                                                                                                                                                                                                                                                      |
  | config_drive                         |                                                                                                                                                                                                                                                      |
  | created                              | 2015-09-16T02:47:04Z                                                                                                                                                                                                                                 |
  | fault                                | {"message": "Build of instance a0dc0f03-155c-422b-b0ac-996fc17e0989 aborted: Failure prepping block device.", "code": 500, "details": "  File \"/usr/lib/python2.7/dist-packages/nova/compute/manager.py\", line 2219, in _do_build_and_run_instance |
  |                                      |     filter_properties)                                                                                                                                                                                                                               |
  |                                      |   File \"/usr/lib/python2.7/dist-packages/nova/compute/manager.py\", line 2330, in _build_and_run_instance                                                                                                                                           |
  |                                      |     'create.error', fault=e)                                                                                                                                                                                                                         |
  |                                      |   File \"/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py\", line 85, in __exit__                                                                                                                                                             |
  |                                      |     six.reraise(self.type_, self.value, self.tb)                                                                                                                                                                                                     |
  |                                      |   File \"/usr/lib/python2.7/dist-packages/nova/compute/manager.py\", line 2303, in _build_and_run_instance                                                                                                                                           |
  |                                      |     block_device_mapping) as resources:                                                                                                                                                                                                              |
  |                                      |   File \"/usr/lib/python2.7/contextlib.py\", line 17, in __enter__                                                                                                                                                                                   |
  |                                      |     return self.gen.next()                                                                                                                                                                                                                           |
  |                                      |   File \"/usr/lib/python2.7/dist-packages/nova/compute/manager.py\", line 2439, in _build_resources                                                                                                                                                  |
  |                                      |     reason=msg)                                                                                                                                                                                                                                      |
  |                                      | ", "created": "2015-09-16T02:47:08Z"}                                                                                                                                                                                                                |
  | flavor                               | m1.small (090955df-7dbe-4102-bcfb-4d64d0cc5105)                                                                                                                                                                                                      |
  | hostId                               | bf381a5d2d9136fe4669218bcda1467156b71227023610e0311f9e86                                                                                                                                                                                             |
  | id                                   | a0dc0f03-155c-422b-b0ac-996fc17e0989                                                                                                                                                                                                                 |
  | image                                | Attempt to boot from volume - no image supplied                                                                                                                                                                                                      |
  | key_name                             | -                                                                                                                                                                                                                                                    |
  | metadata                             | {}                                                                                                                                                                                                                                                   |
  | name                                 | test1                                                                                                                                                                                                                                                |
  | os-extended-volumes:volumes_attached | []                                                                                                                                                                                                                                                   |
  | status                               | ERROR                                                                                                                                                                                                                                                |
  | tenant_id                            | 3296a2ca68a04a139258927447956d95                                                                                                                                                                                                                     |
  | updated                              | 2015-09-16T02:47:09Z                                                                                                                                                                                                                                 |
  | user_id                              | ab2a6867991f4cd785c75935ea80f0fb                                                                                                                                                                                                                     |
  +--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

  Version : Kilo

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


References