Comment 3 for bug 1746073

Revision history for this message
Felipe Reyes (freyes) wrote : Re: [Bug 1746073] Re: [RFE] boot instances from a volume instead of openstack's configured default

On Wed, Jan 31, 2018 at 03:47:31AM -0000, Ian Booth wrote:
> The goose client used by Juju doesn't expose the config necessary to enable block device mapping.
> >From what I can see here https://developer.openstack.org/api-ref/compute/, there's several possible configuration options when using the start instance API:
>
> "block_device_mapping_v2": [{
> "boot_index": "0",
> "uuid": "ac408821-c95a-448f-9292-73986c790911",
> "source_type": "volume",
> "volume_size": "25",
> "destination_type": "volume",
> "delete_on_termination": false,
> "tag": "disk1",
> "disk_bus": "scsi"}]
>
> It wouldn't be practical to specify all of these using constraint
> syntax.

agree.

> If we did support:
>
> juju deploy cs:ubuntu --constraints="root-storage=volume root-disk=20G"
>
> then we'd need to use sensible defaults for everything else.
> delete_on_termination defaults to false if not specified and I think
> that's what you are asking for? But it means you'll need to manage
> yourself if the instance is deleted. To be clear - you are asking for
> this to allow users to access any left over data after the nova instance
> may be deleted. Hence delete_on_termination=false would be what you
> want.

I think setting this to false and leaving up to the user the task of
cleaning the volumes they have no interest on makes sense, specially
considering the user will opt-in (via constraints) to ask juju doing
this.

Do you know if juju launches AWS instances backed by EBS volumes?, because on AWS the default is True

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/RootDeviceStorage.html

> Would both source_type and destination_type be set to "volume"? Source
> type also supports blank, snapshot, volume, or image.

source_type should be image, because we will be using an image from the
simplestreams index

>
> Juju would set the tag value to the model UUID I think?

not sure if model or machine id would be appropriate here, probably the
later, so you could correlate in which machine a given volume was used.