How to specify Cinder volume type?

Hi,

I want to deploy machine with non-standard volume type, or generally choose between multiple volume types (standard, performance, performance-20k,…). How to specify it during the deployment? Using constraints? On OpenStack.

Lumir

You can use a Juju storage pool to do what you want.
See the doc here:

(and in particular the OpenStack/Cinder section).

The cinder storage provisioner has a “volume-type” attribute that can be used. So you’d set up a storage pool with that attribute set to what you want and specify that storage pool when deploying your charm.

eg

juju create-storage-pool performance cinder volume-type=performance
juju deploy mycharm --storage database=performance,20G

Many thanks @wallyworld!

L.

@wallyworld I tested it and problem is, that it works only with charms, but not whole bundles.

I was able for example change the volume-type for data storage Etcd as part of k8s-core, but the machine/0 and machine/1 had still standard storage.

I tried to modify default storage-pool atribute using:

juju update-storage-pool cinder volume-type=performance-20000

But I received:

ERROR pool "cinder" not found

Is there a way how to set the volume-type attribute also for machines?

L.

Bundles don’t support creating storage pools.
But once the storage pool is created, you can refer to it from the bundle, just the same was as you use --storage when deploying a single charm.

With your update command, you update a pool by name. So if you first did

juju create-storage-pool performance cinder volume-type=performance-10000

you’d then do

juju update-storage-pool performance volume-type=performance-20000