Commit 7062b12b9b91a1eb405d7079c62b62b0de59109f introduced
a bug where the default_volume_type is set to 'lvm' but
that is not the volume-type that's actually created, that
is 'lvmdriver-1' in gate runs, so we see a ton of
VolumeTypeNotFoundByName for the 'lvm' volume type in the
cinder-api logs.
This simply sets the default_volume_type to the volume
type that's created in the create_volume_types function.
Also renames the default_type variable to default_name to
be consistent with variable naming in the rest of the
cinder script.
Change-Id: Ib35ffc09f6582354010ac8ca35da581ea508877a
Closes-Bug: #1348786
| ... | ... |
@@ -238,21 +238,21 @@ function configure_cinder {
|
| 238 | 238 |
|
| 239 | 239 |
if is_service_enabled c-vol && [[ -n "$CINDER_ENABLED_BACKENDS" ]]; then |
| 240 | 240 |
enabled_backends="" |
| 241 |
- default_type="" |
|
| 241 |
+ default_name="" |
|
| 242 | 242 |
for be in ${CINDER_ENABLED_BACKENDS//,/ }; do
|
| 243 | 243 |
BE_TYPE=${be%%:*}
|
| 244 | 244 |
BE_NAME=${be##*:}
|
| 245 | 245 |
if type configure_cinder_backend_${BE_TYPE} >/dev/null 2>&1; then
|
| 246 | 246 |
configure_cinder_backend_${BE_TYPE} ${BE_NAME}
|
| 247 | 247 |
fi |
| 248 |
- if [[ -z "$default_type" ]]; then |
|
| 249 |
- default_type=$BE_TYPE |
|
| 248 |
+ if [[ -z "$default_name" ]]; then |
|
| 249 |
+ default_name=$BE_NAME |
|
| 250 | 250 |
fi |
| 251 | 251 |
enabled_backends+=$BE_NAME, |
| 252 | 252 |
done |
| 253 | 253 |
iniset $CINDER_CONF DEFAULT enabled_backends ${enabled_backends%,*}
|
| 254 |
- if [[ -n "$default_type" ]]; then |
|
| 255 |
- iniset $CINDER_CONF DEFAULT default_volume_type ${default_type}
|
|
| 254 |
+ if [[ -n "$default_name" ]]; then |
|
| 255 |
+ iniset $CINDER_CONF DEFAULT default_volume_type ${default_name}
|
|
| 256 | 256 |
fi |
| 257 | 257 |
fi |
| 258 | 258 |
|