Bug 1035291 - [RFE][horizon]: openstack-nova: enable to attach an existing volume together with a bootable image
Summary: [RFE][horizon]: openstack-nova: enable to attach an existing volume together ...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-django-horizon
Version: 4.0
Hardware: All
OS: Linux
medium
unspecified
Target Milestone: ---
: ---
Assignee: Radomir Dopieralski
QA Contact: Shai Revivo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-27 13:22 UTC by Tzach Shefi
Modified: 2019-09-09 14:29 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-23 15:33:35 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Tzach Shefi 2013-11-27 13:22:16 UTC
Description of problem:
the launch of an instance lacks the ability to attach an existing volume to the launched instance together with an boot image. 

Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux Server release 6.5
openstack-nova-compute-2013.2-5.el6ost.noarch

Comment 2 Xavier Queralt 2013-11-27 13:30:55 UTC
Hi Tzach, could you be more specific with your request?

With Havana it is possible to launch an instance and specify any kind of block device mapping you have to attach (See [1]).

For example, for booting an instance from an image and attaching a volume to it [during boot] you can use the following command line:

$ nova boot --image <image_id> --flavor <flavor_id> --block-device source=volume,dest=volume,id=<volume_id> <instance_name>

If what you want is to be able to do this from the dashboard you should move the BZ to the python-django-horizon component.

[1] https://wiki.openstack.org/wiki/BlockDeviceConfig#Command_line_syntax_for_block_config

Comment 3 Tzach Shefi 2013-11-28 07:31:20 UTC
Hi Xavier, 

Understood, Moved BZ to python-django-horizon component.

Thanks

Comment 4 Matthias Runge 2013-11-28 08:02:55 UTC
It is possible to add a block device to an instance, and that option has been there for a long time in Horizon.

So, could you please be more specific?

Comment 5 Tzach Shefi 2013-11-28 09:01:00 UTC
This isn't the same as adding a block device to instance, what i mean is adding a pre existing volume during instance launch then booting off an image. 

Today on “Lunch instance” page, under “Instance boot source” ->  Boot from image (creates a new volume).    Why only this option for a new volume? 

Would be a good idea to add another option -> Boot from image (add a pre existing volume). Plus an option to choose which volume i want to to use.

Comment 6 Matthias Runge 2013-12-04 07:59:16 UTC
To be clear: you want to be able to share a boot volume by several instances?

Comment 7 Tzach Shefi 2013-12-04 09:43:05 UTC
No well not share the exact same boot volume online. 

More like move or clone that boot volume from an existing instance, to a new instance and then booting of an image say iso file.

Comment 8 Matthias Runge 2014-02-11 19:34:36 UTC
Probably related:
https://blueprints.launchpad.net/horizon/+spec/horizon-block-device-mapping-v2

Comment 9 Julie Pichon 2014-10-15 11:26:46 UTC
Horizon has many launch options, including 3 that are already related to volumes:

1. Boot from an existing volume
2. Boot from an image (creates a new volume)
3. Boot from a volume snapshot (creates a new volume)

The comments seem to suggest different things so it's difficult to understand what's requested...

Based on comment 7, something like the following?

4. Boot from the clone of a volume currently attached to a running instance (creates a new volume)

If so, is there an existing nova API to do this in one command? Currently the only way to create a snapshot or image from an attached volume ("in-use" status) requires using a "force" option, suggesting this is a dangerous operation. I'd be disinclined to add this to Horizon if there is no safe way to do it.

Or is it:

5. Boot from an image, and also attach an existing non-bootable (probably?) volume

I guess the use case is having access to existing data? What's the Nova command to achieve this?

Could you open an upstream bug for what you want? Including the use case to clarify the need for another boot option, and also indicating which nova API it should map to and how to call it to produce the expected result would be really helpful.

Comment 10 Tzach Shefi 2014-10-19 08:11:36 UTC
I'll try to explain it better

1. Create an instance from a volume 
2. Lets say that this instance (with critical data saved on volume) now has a problem, it can no longer boot-up by it self. 

3. I must repair/fix this instance, but I need the data and don't want to spin up another instance in it's place. 

If instance was a "regular" pc, I'd just use a Linux/Windows Installation media CD. Booting off this CD would enable fixing boot issue - problem fixed. Take out the temp CD and bootup the so called PC. 

4. In case of an instance I can't do this special case, where I have an instance but would like to temporarily boot from A Glance ISO image (Linux or Windows installation media) just to repair my broken instance's volume. 

BTW not sure there is a valid nova API for this case. That might be to be the upstream bug case to begin with.

It's a rare use case for Openstack, not sure it's worth while chasing this, I'll ask around. 

What do you think?

Comment 11 Julie Pichon 2014-10-20 13:45:08 UTC
Hi Tzach, thank you for taking the time to explain further, I think I understand the use case a bit better. You say yourself that this is a rare use case, so I would be reluctant to add it to the Launch Instance screen because it's a screen that's used often and can already be pretty overwhelming. It sounds like there is already a workaround, of force-cloning the volume and then changing the attachment or starting a new instance. From the way you describe it though, I'm not sure if attaching the same volume to 2 instances is possible...? So a new instance might need to be created anyway.

Comment 14 Radomir Dopieralski 2017-02-02 10:39:02 UTC
Is this feature request still relevant?

Comment 15 Tzach Shefi 2017-02-13 22:50:28 UTC
Yes I think so, but I'd rather have a PM decide/answer.  
 
Use case comment #10 remains valid. 
To this day I still can't mount an ISO as boot device just to fix an instance's OS installation, should I ever need to do so. I mean other than bypassing Openstack/Nova using virt-manager to connect an iso image and changing boot order of that instance.


Note You need to log in before you can comment on or make changes to this bug.