Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding multiple Ephemeral Volumes to Compute Instance on OpenStack #4042

Closed
afritzler opened this issue Nov 24, 2015 · 8 comments · Fixed by #5131
Closed

Adding multiple Ephemeral Volumes to Compute Instance on OpenStack #4042

afritzler opened this issue Nov 24, 2015 · 8 comments · Fixed by #5131

Comments

@afritzler
Copy link

Hi guys,

is there a way to add multiple ephemeral volumes to a given instance?

nova boot <vm-name> --image <image-id> --flavor <flaovr-id> \ 
--nic net-id=<net-id> --availability-zone <availability-zone-name> \
--ephemeral size=<size>,format=<format_type> \
--ephemeral size=<size>,format=<format_type> \
... and so on

Of course your flavor has to have a big enough ephemeral size configured.

http://docs.openstack.org/cli-reference/content/novaclient_commands.html#novaclient_subcommand_boot

Regards,
Andreas

@jtopjian
Copy link
Contributor

Hi there,

I didn't know you could do this. 😄

It looks like this works by passing the ephemeral disks to the block_device_mapping parameter of the Nova API:

"block_device_mapping_v2": [
    {
        "boot_index": 0,
        "delete_on_termination": true,
        "destination_type": "local",
        "source_type": "image",
        "uuid": "036fa6c1-b9c1-435c-9d70-83de40d4af96"
    },
    {
        "boot_index": -1,
        "delete_on_termination": true,
        "destination_type": "local",
        "guest_format": "ext4",
        "source_type": "blank",
        "volume_size": "1"
    },
    {
        "boot_index": -1,
        "delete_on_termination": true,
        "destination_type": "local",
        "guest_format": "ext4",
        "source_type": "blank",
        "volume_size": "1"
    }
],

This should be supported in Gophercloud, under the bootfromvolume extension. If this is true, then the Terraform OpenStack provider will need modified to allow more than one block_device block (right now it enforces only one under the assumption that it's a single bootable volume).

Thanks for reporting this. Hopefully we'll be able to get this enabled soon.

@afritzler
Copy link
Author

Thanks for the update @jtopjian. Looking forward to the multiple block_device support.

@jtopjian
Copy link
Contributor

Just a quick update: I have this working but need to get a few small changes into Gophercloud. If you're interested, here is the working code:

https://github.com/jtopjian/terraform/tree/jtopjian-openstack-multi-ephemeral
https://github.com/jtopjian/gophercloud/tree/jtopjian-multi-ephemeral

There might be minor changes to those two branches over time.

@afritzler
Copy link
Author

Thanks a lot for the update @jtopjian!

@justinclayton
Copy link
Contributor

@jtopjian I feel like my timing is very fortunate, as it looks like this is really close to being done. If I am reading this right, you merged #4288 yesterday, which was a prerequisite for you creating a PR for your jtopjian-openstack-multi-ephemeral branch (jtopjian/terraform@d681c25)?

@jtopjian
Copy link
Contributor

@justinclayton Yep, all correct. 😄

The next step is to get rackspace/gophercloud#515 merged and then I'll be able to open a PR for jtopjian@d681c25.

@jtopjian
Copy link
Contributor

@afritzler @justinclayton Hey guys, just a heads up that I opened #5131. If you can, please test and let me know if you have any problems or comments!

@ghost
Copy link

ghost commented Apr 27, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants