Use new block device mapping for booting from volume

Registered by Xavier Queralt

Right now, when booting from a volume, horizon uses a different block_device_mapping depending on the source: v1 if the source is a volume or an snapshot and v2 if it is an image.

https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py#L571

The "create instance" menu should check if BMDv2 extension is enabled in the server side. If that is the case, booting from a volume, a volume created from a snapshot or an image should be enabled and using the BDMv2 API call.

If only BDMv1 is enabled in the server, booting an instance from a volume created from an image shouldn't be allowed. All the other options would use the BDMv2 API call.

In the case where none of the extensions is enabled, it shouldn't be allowed to boot from a volume at all.

Blueprint information

Status:
Complete
Approver:
David Lyle
Priority:
Medium
Drafter:
None
Direction:
Approved
Assignee:
Arvinder Singh
Definition:
Approved
Series goal:
Accepted for liberty
Implementation:
Implemented
Milestone target:
milestone icon 8.0.0
Started by
Arvinder Singh
Completed by
Arvinder Singh

Related branches

Sprints

Whiteboard

[lcheng:10/23/2013] - Note that block_device_mapping_v2 is a Nova extension API. It is not guaranteed that Nova will have it. When the blueprint is implemented, it should be able to fallback to v1 if the extension is not available.
[xqueralt:11/14/2013] - block_device_mapping_v1 is also an extension which is not present anymore in nova API v3 (bdm v2 is the default). Thus I'd recommend to switch to the bdm v2 syntax which will help when transitioning to nova aPI v3.
[david-lyle:11/19/2013] - Seems like we'll need to handle both for the time being.
[xqueralt:11/20/2013] - Fair enough, I've updated the description with more details about this.

[2014-01-12 david-lyle] moving to i-3 as not started yet

[2014-01-27 david-lyle] moving out of icehouse as not started yet.

[2014-08-21 swapnil-maddalwar] I have gone through the inputs provided till now on the blueprint and I am interested in taking this up for implementation. Could someone let me know the plans for this one and also if it is possible to assign this to me.

[2014-08-22 swapnil-maddalwar] @david-lyle : Thanks for assigning the blueprint to me. Just need one clarification regarding the requirement in the below statement.

"If only BDMv1 is enabled in the server, booting an instance from a volume created from an image shouldn't be allowed. All the other options would use the BDMv2 API call."

Question: At the end of the statement it is mentioned that all other options would use the BDMV2 api call, is this correct?? I think they should use BDMV1 api call as BDMV1 is enabled in the server. Please clarify!!

[2014-08-28 swapnil-maddalwar] Did anyone have inputs on the query that I have asked in 2014-08-22?

[2014-09-10 swapnil-maddalwar]
Guys, I am planning to use below logic for implementing the requirements of this blueprint. Please let me know if anyone has any suggestions/inputs on the same.

IF ((Volume Service Enabled)
THEN
 IF(BDMV2 Enabled)
 THEN
          Booting from Volume available AND Uses BDMV2 format
          Booting from image (create new volume) available AND Uses BDMV2 format
          Booting from volume snapshot (create new volume) available AND Uses BDMV2 format
 ELSE IF (BDMV1 Enabled)
 THEN
          Booting from Volume available AND Uses BDMV1 format
          Booting from volume snapshot (create new volume) available AND Uses BDMV1 format
 ELSE
          Booting from volume options are NOT available

[2014.10.21 jpichon] Hi Swapnil. Your comment from September sounds accurate to me based on the blueprint description. For more up to date information you probably need to reach out to the nova folks directly :) Though I think there is enough info to start working on this now. Thank you!

Gerrit topic: https://review.openstack.org/#q,topic:bp/bdmv2,n,z

Addressed by: https://review.openstack.org/135253
    Use bdmv2 format when instance is boot from volume

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.