Merge "Make sure to set default_volume_type when only one storage backend"
This commit is contained in:
commit
bcdef4e424
|
@ -103,17 +103,18 @@ class CinderHelm(openstack.OpenstackBaseHelm):
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
# If there are more CEPH backends, we default to the volume type
|
# Always set the default_volume_type to the volume type associated with the
|
||||||
# associated with the primary CEPH tier, which currently has the name
|
# primary Ceph backend/tier which is available on all StarlingX platform
|
||||||
# set to 'ceph-store'.
|
# configurations. This will guarantee that any Cinder API requests for
|
||||||
if len(backends) > 1:
|
# this value will be fulfilled as part of determining a safe volume type to
|
||||||
default = next(
|
# use during volume creation. This can be overrides by the user when/if
|
||||||
(b.name for b in backends
|
# additional backends are added to the platform.
|
||||||
if b.name ==
|
default = next(
|
||||||
constants.SB_DEFAULT_NAMES[constants.SB_TYPE_CEPH]), None)
|
(b.name for b in backends
|
||||||
if default:
|
if b.name == constants.SB_DEFAULT_NAMES[constants.SB_TYPE_CEPH]), None)
|
||||||
conf_cinder['DEFAULT']['default_volume_type'] = \
|
if default:
|
||||||
default.encode('utf8', 'strict')
|
conf_cinder['DEFAULT']['default_volume_type'] = \
|
||||||
|
default.encode('utf8', 'strict')
|
||||||
|
|
||||||
return conf_cinder
|
return conf_cinder
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue