diff --git a/etc/kolla/config/cinder/cinder-api.conf b/etc/kolla/config/cinder/cinder-api.conf new file mode 100644 index 000000000..b6a7eb46e --- /dev/null +++ b/etc/kolla/config/cinder/cinder-api.conf @@ -0,0 +1,2 @@ +[DEFAULT] +default_volume_type = lvm-1 diff --git a/etc/kolla/config/cinder/cinder-volume.conf b/etc/kolla/config/cinder/cinder-volume.conf new file mode 100644 index 000000000..b6a7eb46e --- /dev/null +++ b/etc/kolla/config/cinder/cinder-volume.conf @@ -0,0 +1,2 @@ +[DEFAULT] +default_volume_type = lvm-1 diff --git a/etc/kolla/config/cinder/cinder.conf b/etc/kolla/config/cinder/cinder.conf deleted file mode 100644 index 1c7b407db..000000000 --- a/etc/kolla/config/cinder/cinder.conf +++ /dev/null @@ -1,2 +0,0 @@ -[DEFAULT] -default_volume_type = iscsi diff --git a/install.sh b/install.sh index 7a288b6e4..67d039636 100755 --- a/install.sh +++ b/install.sh @@ -146,6 +146,7 @@ if [ "${OS_KOLLA_RUN_INIT:-true}" == "true" ]; then source /etc/kolla/admin-openrc.sh curl -fsSL "https://raw.githubusercontent.com/openstack/kolla-ansible/${OS_KOLLA_VERSION:-stable/2024.1}/tools/init-runonce" | bash + [ "${OS_KOLLA_ENABLE_CINDER:-yes}" == "yes" ] && ./scripts/cinder.sh [ "${OS_KOLLA_ENABLE_MAGNUM:-no}" == "yes" ] && ./scripts/magnum.sh [ "${OS_KOLLA_ENABLE_NEUTRON_TRUNK:-yes}" == "yes" ] && ./scripts/neutron_trunk.sh fi diff --git a/scripts/cinder.sh b/scripts/cinder.sh new file mode 100755 index 000000000..6ac834a26 --- /dev/null +++ b/scripts/cinder.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2024 +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +set -o nounset +set -o pipefail +set -o errexit +if [[ ${OS_DEBUG:-false} == "true" ]]; then + export PKG_DEBUG=true + set -o xtrace +fi + +os_cinder_volume_type="lvm-1" + +if ! openstack volume type list | grep -q "$os_cinder_volume_type"; then + openstack volume type create "$os_cinder_volume_type" \ + --property volume_backend_name="$os_cinder_volume_type" +fi