OpenStack: Can't set root-disk-source to use local storage

Bug #1989401 reported by Haw Loeung
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Evanson Mwangi

Bug Description

Hi,

https://juju.is/docs/olm/constraints#heading--openstack says:

"""
Note: root-disk-source is either “local” or “volume”
"""

But when trying to set to local storage, I get an error about it being unsupported:

| prod-is-external-kubernetes@is-my-bastion-ps5:~$ juju set-constraints kubernetes-worker 'cores=4 mem=16384M root-disk=51200M root-disk-source=local'
| ERROR invalid constraint value: root-disk-source=local
| valid values are: [volume]

| prod-is-external-kubernetes@is-my-bastion-ps5:~$ juju set-model-constraints root-disk-source=local
| ERROR invalid constraint value: root-disk-source=local
| valid values are: [volume]

Model is running Juju 2.9.32. Client I've tried is 2.9.34-ubuntu-amd64 from the snap.

Haw Loeung (hloeung)
description: updated
Revision history for this message
Paul Collins (pjdc) wrote (last edit ):

This might be the culprit (https://github.com/juju/juju/blob/develop/provider/openstack/provider.go#L596):

validator.RegisterVocabulary(constraints.RootDiskSource, []string{rootDiskSourceVolume})

I'd guess it should be something like:

validator.RegisterVocabulary(constraints.RootDiskSource, []string{rootDiskSourceLocal, rootDiskSourceVolume})

Ian Booth (wallyworld)
Changed in juju:
milestone: none → 2.9.35
importance: Undecided → High
status: New → Triaged
assignee: nobody → Evanson Mwangi (mr-parish)
Changed in juju:
status: Triaged → In Progress
Revision history for this message
Evanson Mwangi (mr-parish) wrote :
Revision history for this message
John A Meinel (jameinel) wrote :

I agree that should be fixed, though from what I can read of the code, you shouldn't need to set "local" as it is the default value if it is not otherwise set.
I think Paul's suggestion looks valid, we just need to test it.

Changed in juju:
milestone: 2.9.35 → 2.9.36
Revision history for this message
Paul Collins (pjdc) wrote :

> you shouldn't need to set "local" as it is the default value if it is not otherwise set.

FWIW, our scenario is that we have set the model constraint to "volume" but wish to override it selectively where it doesn't make sense for the particular application (e.g. for lower I/O latency or to avoid write/space amplification).

Revision history for this message
Evanson Mwangi (mr-parish) wrote :
Changed in juju:
status: In Progress → Fix Committed
Harry Pidcock (hpidcock)
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.