It is not possible to select AZ for new Cinder volume during the VM creation

Bug #1485578 reported by Timur Nurlygayanov
36
This bug affects 8 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned
OpenStack Dashboard (Horizon)
Confirmed
Wishlist
Unassigned

Bug Description

Steps To Reproduce:
1. Deploy OpenStack cluster with several Nova availability zones, for example, 'nova1' and 'nova2' and with several Cinder availability zones, for example, 'storage1' and 'storage2' (availability zones for Nova and Cinder should be different).
2. Login to Horizon dashboard and navigate to Project > Instances
3. Click on 'Launch Instance' button
4. Set all required parameters, select Nova AZ 'nova1' for new VM and select Instance Boot Source = "Boot from image (creates new volume)"
5. Click on 'Launch' button

Observed Result:
Instance will fail with "Failure prepping block device" error (please see attached screenshot horizon_az_bug.png)

Expected Result:
As a user I expect that Horizon UI will provide me the ability to select the availability zone for new volume if I want to create new volume and boot VM from it. We can't use Nova AZ as availability zone for Cinder volume because these zones are different availability zones (we can have, for example, 1 Nova availability zones and many Cinder availability zone or one Cinder AZ and many Nova AZs - it depends on users needs).

Tags: cinder
Revision history for this message
Timur Nurlygayanov (tnurlygayanov) wrote :
Revision history for this message
Timur Nurlygayanov (tnurlygayanov) wrote :

I think Horizon UI should provide something like drop down list with the list of Cinder availability zones when user wants to boot VM with option "Boot from image (creates new volume)" - we can prepare the fix for the existing Horizon UI (to support many AZs for Nova & Cinder use case in Kilo and Liberty releases).

Also, I know that Horizon team works on the new UI for Instance creation workflow, so, we need to make sure that it will be supported with new UI as well.

Revision history for this message
Gary W. Smith (gary-w-smith) wrote :

This bug was last updated over 2 years ago, and the launch instance
has been entirely re-written. Can you reproduce the error with a
current release of horizon? If the issue still exists, please
feel free to reopen it.

tags: added: cinder
Changed in horizon:
status: New → Invalid
Revision history for this message
Jorge (jjhdzh) wrote :

Hi Gary
I have the same problem,
I have two Storage Zones,(zone1,zone2) but when I tried to create a virtual machine for zone1 with availability zone1 its works, but when I tried to create a virtual machine for zone2 with availability
zone2, the virtual machine was created with Availability zone zone2 but the availability zone storage is not zone2 it was created on zone1

i`m using newton release, Could you help me with some tips and trick to resolve this issue please

Revision history for this message
Akihiro Motoki (amotoki) wrote :

In my understanding, the only way is to create a volume in advance and then launch an instance with a precreated volume.

When considering how to fix it, we need to care whether cross AZ attach is allowed or not.
- In case of cross AZ attach is not allowed, a volume should be created with a same name as Nova AZ.
- In case of cross AZ attach is allowed, we need to provide a way to specify a volume AZ.

Right?

Changed in horizon:
status: Invalid → New
Revision history for this message
Jorge (jjhdzh) wrote :

Hi Akihiro

That´s right, when i created a machine from a volume, i can specify type and zone and then i can launch the machine, it´s works.

But when i tryed to create a new machine from horizon, i selected availaibility zone like zone2, but when that machine launch, the volume goes to zone1 and the machine goes to zone2

How could you launch a new machine from horizon using another AZ for Volume and machine?

Revision history for this message
Akihiro Motoki (amotoki) wrote :

Can you do the same thing from nova CLI?

Looking at the compute API, I see no availability zone information in block_device_mapping_v2 parameter of "Create Server" API [1]. horizon depends on nova support. If you can succeed it via CLI or API directly, horizon can support it. I would like to confirm the nova support.

If Nova does not support it, there still might be a room to add some wrapper logic in horizon but it is worth checking the nova support first.

[1] https://developer.openstack.org/api-ref/compute/#create-server

Revision history for this message
Akihiro Motoki (amotoki) wrote :

I added nova to the affect project according to my comment #7.

Akihiro Motoki (amotoki)
Changed in horizon:
status: New → Confirmed
Revision history for this message
Matt Riedemann (mriedem) wrote :

Comment #5 is exactly correct. You can't tell nova which cinder AZ to create a volume in if nova is creating the volume. If you need a specific AZ for the volume, you need to pre-create the volume in cinder and then provide that volume to nova during the server create request. It's the same issue with using a non-default volume type, you'd have to pre-create a volume and provide it to nova in that case.

Changed in nova:
status: New → Invalid
Revision history for this message
Akihiro Motoki (amotoki) wrote :

As of now, the nova team has no plan to support more features in block-device-mapping in create-server API in favor of "No more API proxies" and "No more Orchestration" [1].

Horizon needs to provide a corresponding orchestration feature.

The design of the feature needs more thought because there are several patterns in nova/cinder AZ combination and cross-AZ attach.

[1] https://docs.openstack.org/nova/latest/contributor/project-scope.html#api-scope

Changed in horizon:
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.