diff options
| author | Steven Dake <stdake@cisco.com> | 2015-08-07 09:02:07 -0700 |
|---|---|---|
| committer | Steven Dake <stdake@cisco.com> | 2015-08-07 22:32:56 -0700 |
| commit | ec272b8fe4da85351d549022829c6a2329666376 (patch) | |
| tree | 4971a62eb388f208c376510ad7e49fddedda75b5 /docker | |
| parent | b84abb9425afebddf0109ecb36e383c2a228b5a8 (diff) | |
| download | kolla-ec272b8fe4da85351d549022829c6a2329666376.tar.gz kolla-ec272b8fe4da85351d549022829c6a2329666376.zip | |
Remove config-internal from cinder
Partially-Implements: blueprint remove-config-internal
Change-Id: Ic6b7cb217a126c53c0055dbcac4d345583599eb1
Diffstat (limited to 'docker')
34 files changed, 11 insertions, 484 deletions
diff --git a/docker/centos/binary/cinder-app/cinder-api/Dockerfile b/docker/centos/binary/cinder-app/cinder-api/Dockerfile index c96caaecc..98899a79b 100644 --- a/docker/centos/binary/cinder-app/cinder-api/Dockerfile +++ b/docker/centos/binary/cinder-app/cinder-api/Dockerfile @@ -2,7 +2,7 @@ FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%cinder-base:%%KOLLA_TAG%% MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum install -y python-keystone && yum clean all -COPY config-internal.sh config-external.sh /opt/kolla/ +COPY config-external.sh /opt/kolla/ COPY ./start.sh ./check.sh / CMD ["/start.sh"] diff --git a/docker/centos/binary/cinder-app/cinder-api/config-internal.sh b/docker/centos/binary/cinder-app/cinder-api/config-internal.sh deleted file mode 120000 index d929c89b2..000000000 --- a/docker/centos/binary/cinder-app/cinder-api/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/cinder-app/cinder-api/config-internal.sh
\ No newline at end of file diff --git a/docker/centos/binary/cinder-app/cinder-backup/config-internal.sh b/docker/centos/binary/cinder-app/cinder-backup/config-internal.sh deleted file mode 120000 index 5f135c63b..000000000 --- a/docker/centos/binary/cinder-app/cinder-backup/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/cinder-app/cinder-backup/config-internal.sh
\ No newline at end of file diff --git a/docker/centos/binary/cinder-app/cinder-base/Dockerfile b/docker/centos/binary/cinder-app/cinder-base/Dockerfile index e14b792b0..fb8dea608 100644 --- a/docker/centos/binary/cinder-app/cinder-base/Dockerfile +++ b/docker/centos/binary/cinder-app/cinder-base/Dockerfile @@ -2,6 +2,3 @@ FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base:%%KOLLA_TAG%% MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum -y install openstack-cinder automaton && yum clean all - -COPY config-cinder.sh /opt/kolla/config-cinder.sh - diff --git a/docker/centos/binary/cinder-app/cinder-base/config-cinder.sh b/docker/centos/binary/cinder-app/cinder-base/config-cinder.sh deleted file mode 120000 index 22722c185..000000000 --- a/docker/centos/binary/cinder-app/cinder-base/config-cinder.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/cinder-app/cinder-base/config-cinder.sh
\ No newline at end of file diff --git a/docker/centos/binary/cinder-app/cinder-scheduler/Dockerfile b/docker/centos/binary/cinder-app/cinder-scheduler/Dockerfile index 43994f123..70b8d8202 100644 --- a/docker/centos/binary/cinder-app/cinder-scheduler/Dockerfile +++ b/docker/centos/binary/cinder-app/cinder-scheduler/Dockerfile @@ -2,6 +2,6 @@ FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%cinder-base:%%KOLLA_TAG%% MAINTAINER Kolla Project (https://launchpad.net/kolla) COPY ./start.sh /start.sh -COPY config-internal.sh config-external.sh /opt/kolla/ +COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] diff --git a/docker/centos/binary/cinder-app/cinder-scheduler/config-internal.sh b/docker/centos/binary/cinder-app/cinder-scheduler/config-internal.sh deleted file mode 120000 index f3792cd9c..000000000 --- a/docker/centos/binary/cinder-app/cinder-scheduler/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/cinder-app/cinder-scheduler/config-internal.sh
\ No newline at end of file diff --git a/docker/centos/binary/cinder-app/cinder-volume/Dockerfile b/docker/centos/binary/cinder-app/cinder-volume/Dockerfile index 581f9e03a..17412fefa 100644 --- a/docker/centos/binary/cinder-app/cinder-volume/Dockerfile +++ b/docker/centos/binary/cinder-app/cinder-volume/Dockerfile @@ -5,7 +5,7 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum install -y lvm2 scsi-target-utils && yum clean all # Add start scripts -COPY tgtd.sh volume-group-create.sh config-internal.sh config-external.sh /opt/kolla/ +COPY config-external.sh /opt/kolla/ COPY start.sh /start.sh CMD ["/start.sh"] diff --git a/docker/centos/binary/cinder-app/cinder-volume/config-internal.sh b/docker/centos/binary/cinder-app/cinder-volume/config-internal.sh deleted file mode 120000 index 4739be2fc..000000000 --- a/docker/centos/binary/cinder-app/cinder-volume/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/cinder-app/cinder-volume/config-internal.sh
\ No newline at end of file diff --git a/docker/centos/binary/cinder-app/cinder-volume/tgtd.sh b/docker/centos/binary/cinder-app/cinder-volume/tgtd.sh deleted file mode 120000 index f0c885577..000000000 --- a/docker/centos/binary/cinder-app/cinder-volume/tgtd.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/cinder-app/cinder-volume/tgtd.sh
\ No newline at end of file diff --git a/docker/centos/binary/cinder-app/cinder-volume/volume-group-create.sh b/docker/centos/binary/cinder-app/cinder-volume/volume-group-create.sh deleted file mode 120000 index eeeca7063..000000000 --- a/docker/centos/binary/cinder-app/cinder-volume/volume-group-create.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/cinder-app/cinder-volume/volume-group-create.sh
\ No newline at end of file diff --git a/docker/centos/source/cinder-app/cinder-api/Dockerfile b/docker/centos/source/cinder-app/cinder-api/Dockerfile index 8ac5053de..3ce612046 100644 --- a/docker/centos/source/cinder-app/cinder-api/Dockerfile +++ b/docker/centos/source/cinder-app/cinder-api/Dockerfile @@ -3,7 +3,7 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN pip install python-keystoneclient -COPY config-internal.sh config-external.sh /opt/kolla/ +COPY config-external.sh /opt/kolla/ COPY ./start.sh ./check.sh / CMD ["/start.sh"] diff --git a/docker/centos/source/cinder-app/cinder-api/config-internal.sh b/docker/centos/source/cinder-app/cinder-api/config-internal.sh deleted file mode 120000 index d929c89b2..000000000 --- a/docker/centos/source/cinder-app/cinder-api/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/cinder-app/cinder-api/config-internal.sh
\ No newline at end of file diff --git a/docker/centos/source/cinder-app/cinder-backup/Dockerfile b/docker/centos/source/cinder-app/cinder-backup/Dockerfile index 43994f123..70b8d8202 100644 --- a/docker/centos/source/cinder-app/cinder-backup/Dockerfile +++ b/docker/centos/source/cinder-app/cinder-backup/Dockerfile @@ -2,6 +2,6 @@ FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%cinder-base:%%KOLLA_TAG%% MAINTAINER Kolla Project (https://launchpad.net/kolla) COPY ./start.sh /start.sh -COPY config-internal.sh config-external.sh /opt/kolla/ +COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] diff --git a/docker/centos/source/cinder-app/cinder-backup/config-internal.sh b/docker/centos/source/cinder-app/cinder-backup/config-internal.sh deleted file mode 120000 index 5f135c63b..000000000 --- a/docker/centos/source/cinder-app/cinder-backup/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/cinder-app/cinder-backup/config-internal.sh
\ No newline at end of file diff --git a/docker/centos/source/cinder-app/cinder-base/Dockerfile b/docker/centos/source/cinder-app/cinder-base/Dockerfile index 2c1d33977..dd6d8a5bf 100644 --- a/docker/centos/source/cinder-app/cinder-base/Dockerfile +++ b/docker/centos/source/cinder-app/cinder-base/Dockerfile @@ -14,6 +14,3 @@ RUN cd /cinder \ && cp /etc/cinder/cinder.conf.sample /etc/cinder/cinder.conf \ && chown -R cinder: /etc/cinder /var/log/cinder \ && rm -rf /root/.cache - -COPY config-cinder.sh /opt/kolla/config-cinder.sh - diff --git a/docker/centos/source/cinder-app/cinder-base/config-cinder.sh b/docker/centos/source/cinder-app/cinder-base/config-cinder.sh deleted file mode 120000 index 22722c185..000000000 --- a/docker/centos/source/cinder-app/cinder-base/config-cinder.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/cinder-app/cinder-base/config-cinder.sh
\ No newline at end of file diff --git a/docker/centos/source/cinder-app/cinder-scheduler/Dockerfile b/docker/centos/source/cinder-app/cinder-scheduler/Dockerfile index 43994f123..70b8d8202 100644 --- a/docker/centos/source/cinder-app/cinder-scheduler/Dockerfile +++ b/docker/centos/source/cinder-app/cinder-scheduler/Dockerfile @@ -2,6 +2,6 @@ FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%cinder-base:%%KOLLA_TAG%% MAINTAINER Kolla Project (https://launchpad.net/kolla) COPY ./start.sh /start.sh -COPY config-internal.sh config-external.sh /opt/kolla/ +COPY config-external.sh /opt/kolla/ CMD ["/start.sh"] diff --git a/docker/centos/source/cinder-app/cinder-scheduler/config-internal.sh b/docker/centos/source/cinder-app/cinder-scheduler/config-internal.sh deleted file mode 120000 index f3792cd9c..000000000 --- a/docker/centos/source/cinder-app/cinder-scheduler/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/cinder-app/cinder-scheduler/config-internal.sh
\ No newline at end of file diff --git a/docker/centos/source/cinder-app/cinder-volume/Dockerfile b/docker/centos/source/cinder-app/cinder-volume/Dockerfile index 83ce3f604..c7d6c9446 100644 --- a/docker/centos/source/cinder-app/cinder-volume/Dockerfile +++ b/docker/centos/source/cinder-app/cinder-volume/Dockerfile @@ -8,7 +8,7 @@ RUN yum install -y \ && yum clean all # Add start scripts -COPY tgtd.sh volume-group-create.sh config-internal.sh config-external.sh /opt/kolla/ +COPY config-external.sh /opt/kolla/ COPY start.sh /start.sh CMD ["/start.sh"] diff --git a/docker/centos/source/cinder-app/cinder-volume/config-internal.sh b/docker/centos/source/cinder-app/cinder-volume/config-internal.sh deleted file mode 120000 index 4739be2fc..000000000 --- a/docker/centos/source/cinder-app/cinder-volume/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/cinder-app/cinder-volume/config-internal.sh
\ No newline at end of file diff --git a/docker/centos/source/cinder-app/cinder-volume/tgtd.sh b/docker/centos/source/cinder-app/cinder-volume/tgtd.sh deleted file mode 120000 index f0c885577..000000000 --- a/docker/centos/source/cinder-app/cinder-volume/tgtd.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/cinder-app/cinder-volume/tgtd.sh
\ No newline at end of file diff --git a/docker/centos/source/cinder-app/cinder-volume/volume-group-create.sh b/docker/centos/source/cinder-app/cinder-volume/volume-group-create.sh deleted file mode 120000 index eeeca7063..000000000 --- a/docker/centos/source/cinder-app/cinder-volume/volume-group-create.sh +++ /dev/null @@ -1 +0,0 @@ -../../../../common/cinder-app/cinder-volume/volume-group-create.sh
\ No newline at end of file diff --git a/docker/common/cinder-app/cinder-api/config-internal.sh b/docker/common/cinder-app/cinder-api/config-internal.sh deleted file mode 100755 index 158d1efe1..000000000 --- a/docker/common/cinder-app/cinder-api/config-internal.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/bash -set -e - -. /opt/kolla/kolla-common.sh -. /opt/kolla/config-cinder.sh - -check_required_vars ADMIN_TENANT_NAME \ - CINDER_API_SERVICE_HOST \ - CINDER_API_SERVICE_LISTEN \ - CINDER_API_SERVICE_PORT \ - CINDER_KEYSTONE_PASSWORD \ - CINDER_KEYSTONE_USER \ - KEYSTONE_ADMIN_SERVICE_HOST \ - KEYSTONE_ADMIN_SERVICE_PORT \ - KEYSTONE_AUTH_PROTOCOL \ - KEYSTONE_ADMIN_TOKEN \ - PUBLIC_IP - -fail_unless_os_service_running keystone - -cfg=/etc/cinder/cinder.conf - -# Set the auth credentials -export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}" -export SERVICE_ENDPOINT="${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_ADMIN_SERVICE_HOST}:${KEYSTONE_ADMIN_SERVICE_PORT}/v2.0" - -# Create Keystone User -crux user-create --update \ - -n "${CINDER_KEYSTONE_USER}" \ - -p "${CINDER_KEYSTONE_PASSWORD}" \ - -t "${ADMIN_TENANT_NAME}" \ - -r admin - -# Configure Keystone -crux endpoint-create --remove-all \ - -n cinder \ - -t volume \ - -P "http://${CINDER_API_SERVICE_HOST}:${CINDER_API_SERVICE_PORT}/v2/\$(tenant_id)s" \ - -A "http://${CINDER_API_SERVICE_HOST}:${CINDER_API_SERVICE_PORT}/v2/\$(tenant_id)s" \ - -I "http://${CINDER_API_SERVICE_HOST}:${CINDER_API_SERVICE_PORT}/v2/\$(tenant_id)s" - -crux endpoint-create --remove-all \ - -n cinderv2 \ - -t volumev2 \ - -P "http://${CINDER_API_SERVICE_HOST}:${CINDER_API_SERVICE_PORT}/v2/\$(tenant_id)s" \ - -A "http://${CINDER_API_SERVICE_HOST}:${CINDER_API_SERVICE_PORT}/v2/\$(tenant_id)s" \ - -I "http://${CINDER_API_SERVICE_HOST}:${CINDER_API_SERVICE_PORT}/v2/\$(tenant_id)s" - -# Logging -crudini --set $cfg \ - DEFAULT \ - log_file \ - "${CINDER_API_LOG_FILE}" - -# API Configuration -crudini --set $cfg \ - DEFAULT \ - osapi_volume_listen \ - "${CINDER_API_SERVICE_LISTEN}" - -crudini --set $cfg \ - DEFAULT \ - osapi_volume_listen_port \ - "${CINDER_API_SERVICE_PORT}" - -crudini --set $cfg \ - DEFAULT \ - enable_v1_api \ - "false" - -crudini --set $cfg \ - DEFAULT \ - enable_v2_api \ - "true" - -echo "Starting cinder-api" -exec /usr/bin/cinder-api --config-file $cfg diff --git a/docker/common/cinder-app/cinder-api/start.sh b/docker/common/cinder-app/cinder-api/start.sh index 4385d0631..e6f79b3a6 100755 --- a/docker/common/cinder-app/cinder-api/start.sh +++ b/docker/common/cinder-app/cinder-api/start.sh @@ -8,7 +8,7 @@ ARGS="" # Loading common functions. source /opt/kolla/kolla-common.sh -# Config-internal script exec out of this function, it does not return here. +# Execute config strategy set_configs # Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases diff --git a/docker/common/cinder-app/cinder-backup/config-internal.sh b/docker/common/cinder-app/cinder-backup/config-internal.sh deleted file mode 100755 index bd1dda9fa..000000000 --- a/docker/common/cinder-app/cinder-backup/config-internal.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -set -e - -. /opt/kolla/kolla-common.sh -. /opt/kolla/config-cinder.sh - -check_required_vars CINDER_BACKUP_API_CLASS \ - CINDER_BACKUP_MANAGER \ - CINDER_BACKUP_NAME_TEMPLATE \ - CINDER_BACKUP_DRIVER - -cfg=/etc/cinder/cinder.conf - -# volume backup configuration -crudini --set $cfg \ - DEFAULT \ - backup_driver \ - "${CINDER_BACKUP_DRIVER}" -crudini --set $cfg \ - DEFAULT \ - backup_topic \ - "cinder-backup" -crudini --set $cfg \ - DEFAULT \ - backup_manager \ - "${CINDER_BACKUP_MANAGER}" -crudini --set $cfg \ - DEFAULT \ - backup_api_class \ - "${CINDER_BACKUP_API_CLASS}" -crudini --set $cfg \ - DEFAULT \ - backup_name_template \ - "${CINDER_BACKUP_NAME_TEMPLATE}" - -# https://bugs.launchpad.net/kolla/+bug/1461635 -# Cinder requires mounting /dev in the cinder-volume, nova-compute, -# and libvirt containers. If /dev/pts/ptmx does not have proper permissions -# on the host, then libvirt will fail to boot an instance. -# This is a bug in Docker where it is not correctly mounting /dev/pts -# Tech Debt tracker: https://bugs.launchpad.net/kolla/+bug/1468962 -# **Temporary fix** -chmod 666 /dev/pts/ptmx - -echo "Starting cinder-backup" -exec /usr/bin/cinder-backup --config-file $cfg diff --git a/docker/common/cinder-app/cinder-backup/start.sh b/docker/common/cinder-app/cinder-backup/start.sh index 1cc902db6..748c47d91 100755 --- a/docker/common/cinder-app/cinder-backup/start.sh +++ b/docker/common/cinder-app/cinder-backup/start.sh @@ -8,7 +8,7 @@ ARGS="" # Loading common functions. source /opt/kolla/kolla-common.sh -# Config-internal script exec out of this function, it does not return here. +# Execute config strategy set_configs exec $CMD $ARGS diff --git a/docker/common/cinder-app/cinder-base/config-cinder.sh b/docker/common/cinder-app/cinder-base/config-cinder.sh deleted file mode 100755 index a49b17f07..000000000 --- a/docker/common/cinder-app/cinder-base/config-cinder.sh +++ /dev/null @@ -1,157 +0,0 @@ -#!/bin/sh - -set -e - -. /opt/kolla/kolla-common.sh - -check_required_vars ADMIN_TENANT_NAME \ - CINDER_API_VERSION \ - CINDER_DB_NAME \ - CINDER_DB_PASSWORD \ - CINDER_DB_USER \ - CINDER_KEYSTONE_PASSWORD \ - CINDER_KEYSTONE_USER \ - GLANCE_API_SERVICE_HOST \ - GLANCE_API_SERVICE_PORT \ - KEYSTONE_AUTH_PROTOCOL \ - KEYSTONE_PUBLIC_SERVICE_HOST \ - MARIADB_SERVICE_HOST \ - PUBLIC_IP \ - RABBITMQ_SERVICE_HOST \ - RABBITMQ_SERVICE_HOST \ - RABBITMQ_SERVICE_PORT \ - RABBIT_PASSWORD \ - RABBIT_USERID - -dump_vars - -cat > /openrc <<EOF -export OS_AUTH_URL="${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_PUBLIC_SERVICE_HOST}:${KEYSTONE_PUBLIC_SERVICE_PORT}/v2.0" -export OS_USERNAME="${CINDER_KEYSTONE_USER}" -export OS_PASSWORD="${CINDER_KEYSTONE_PASSWORD}" -export OS_TENANT_NAME="${ADMIN_TENANT_NAME}" -export OS_VOLUME_API_VERSION=$CINDER_API_VERSION -EOF - -cfg=/etc/cinder/cinder.conf - -# Logging -crudini --set $cfg \ - DEFAULT \ - log_dir \ - "${CINDER_LOG_DIR}" -crudini --set $cfg \ - DEFAULT \ - verbose \ - "${VERBOSE_LOGGING}" -crudini --set $cfg \ - DEFAULT \ - debug \ - "${DEBUG_LOGGING}" - -# backend -crudini --set $cfg \ - DEFAULT \ - rpc_backend \ - "cinder.openstack.common.rpc.impl_kombu" - -# rabbit -crudini --set $cfg \ - DEFAULT \ - rabbit_host \ - "${RABBITMQ_SERVICE_HOST}" -crudini --set $cfg \ - DEFAULT \ - rabbit_port \ - "${RABBITMQ_SERVICE_PORT}" -crudini --set $cfg \ - DEFAULT \ - rabbit_hosts \ - "${RABBITMQ_SERVICE_HOST}:${RABBITMQ_SERVICE_PORT}" -crudini --set $cfg \ - DEFAULT \ - rabbit_userid \ - "${RABBIT_USERID}" -crudini --set $cfg \ - DEFAULT \ - rabbit_password \ - "${RABBIT_PASSWORD}" -crudini --set /etc/cinder/cinder.conf \ - DEFAULT \ - rabbit_virtual_host \ - "/" -crudini --set /etc/cinder/cinder.conf \ - DEFAULT \ - rabbit_ha_queues \ - "False" - -# control_exchange -crudini --set /etc/cinder/cinder.conf \ - DEFAULT \ - control_exchange \ - "openstack" - -# glance -crudini --set $cfg \ - DEFAULT \ - glance_host \ - "${GLANCE_API_SERVICE_HOST}" -crudini --set $cfg \ - DEFAULT \ - glance_port \ - "${GLANCE_API_SERVICE_PORT}" - -# database -crudini --set $cfg \ - database \ - connection \ - "mysql://${CINDER_DB_USER}:${CINDER_DB_PASSWORD}@${MARIADB_SERVICE_HOST}/${CINDER_DB_NAME}" - -# keystone -crudini --set $cfg \ - DEFAULT \ - auth_strategy \ - "keystone" -crudini --del $cfg \ - keystone_authtoken \ - auth_protocol -crudini --del $cfg \ - keystone_authtoken \ - auth_host -crudini --del $cfg \ - keystone_authtoken \ - auth_port -crudini --set $cfg \ - keystone_authtoken \ - auth_uri \ - "${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_PUBLIC_SERVICE_HOST}:${KEYSTONE_PUBLIC_SERVICE_PORT}/v2.0" -crudini --set $cfg \ - keystone_authtoken \ - identity_uri \ - "${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_ADMIN_SERVICE_HOST}:${KEYSTONE_ADMIN_SERVICE_PORT}" -crudini --set $cfg \ - keystone_authtoken \ - admin_tenant_name \ - "${ADMIN_TENANT_NAME}" -crudini --set $cfg \ - keystone_authtoken \ - admin_user \ - "${CINDER_KEYSTONE_USER}" -crudini --set $cfg \ - keystone_authtoken \ - admin_password \ - "${CINDER_KEYSTONE_PASSWORD}" - - -# oslo_concurrency -crudini --set $cfg \ - oslo_concurrency \ - disable_process_locking \ - True - -mkdir -p /var/lib/cinder/locks - -crudini --set $cfg \ - oslo_concurrency \ - lock_path \ - /var/lib/cinder/locks diff --git a/docker/common/cinder-app/cinder-scheduler/config-internal.sh b/docker/common/cinder-app/cinder-scheduler/config-internal.sh deleted file mode 100755 index e39d15298..000000000 --- a/docker/common/cinder-app/cinder-scheduler/config-internal.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -set -e - -. /opt/kolla/kolla-common.sh -. /opt/kolla/config-cinder.sh - -fail_unless_db - -check_required_vars CINDER_DB_NAME \ - CINDER_DB_PASSWORD \ - CINDER_DB_USER \ - DB_ROOT_PASSWORD \ - INIT_CINDER_DB \ - MARIADB_SERVICE_HOST - -cfg=/etc/cinder/cinder.conf - -if [ "${INIT_CINDER_DB}" == "true" ]; then - mysql -h ${MARIADB_SERVICE_HOST} -u root -p${DB_ROOT_PASSWORD} mysql <<EOF -CREATE DATABASE IF NOT EXISTS ${CINDER_DB_NAME}; -GRANT ALL PRIVILEGES ON ${CINDER_DB_NAME}.* TO -'${CINDER_DB_USER}'@'%' IDENTIFIED BY '${CINDER_DB_PASSWORD}' -EOF - - su -s /bin/sh -c "cinder-manage db sync" cinder -fi - -crudini --set $cfg \ - DEFAULT \ - log_file \ - "${CINDER_SCHEDULER_LOG_FILE}" - -echo "Starting cinder-scheduler" -exec /usr/bin/cinder-scheduler --config-file $cfg diff --git a/docker/common/cinder-app/cinder-scheduler/start.sh b/docker/common/cinder-app/cinder-scheduler/start.sh index 94c87dc13..9f68b61b3 100755 --- a/docker/common/cinder-app/cinder-scheduler/start.sh +++ b/docker/common/cinder-app/cinder-scheduler/start.sh @@ -8,7 +8,7 @@ ARGS="" # Loading common functions. source /opt/kolla/kolla-common.sh -# Config-internal script exec out of this function, it does not return here. +# Execute config strategy set_configs exec $CMD $ARGS diff --git a/docker/common/cinder-app/cinder-volume/config-internal.sh b/docker/common/cinder-app/cinder-volume/config-internal.sh deleted file mode 100755 index 79a813e9c..000000000 --- a/docker/common/cinder-app/cinder-volume/config-internal.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/bash - -set -e - -. /opt/kolla/kolla-common.sh -. /opt/kolla/config-cinder.sh -. /opt/kolla/volume-group-create.sh - -check_required_vars CINDER_ENABLED_BACKEND \ - CINDER_LVM_LO_VOLUME_SIZE \ - CINDER_VOLUME_API_LISTEN \ - CINDER_VOLUME_BACKEND_NAME \ - CINDER_VOLUME_DRIVER \ - CINDER_VOLUME_GROUP \ - ISCSI_HELPER \ - ISCSI_IP_ADDRESS - -cfg=/etc/cinder/cinder.conf - -# Logging -crudini --set $cfg \ - DEFAULT \ - log_file \ - "${CINDER_VOLUME_LOG_FILE}" - -# IP address on which OpenStack Volume API listens -crudini --set $cfg \ - DEFAULT \ - osapi_volume_listen \ - "${CINDER_VOLUME_API_LISTEN}" - -# The IP address that the iSCSI daemon is listening on -crudini --set $cfg \ - DEFAULT \ - iscsi_ip_address \ - "${ISCSI_IP_ADDRESS}" - -# Set to false when using loopback devices (testing) -crudini --set $cfg \ - DEFAULT \ - secure_delete \ - "false" - -crudini --set $cfg \ - DEFAULT \ - enabled_backends \ - "${CINDER_ENABLED_BACKEND}" - -crudini --set $cfg \ - lvm57 \ - iscsi_helper \ - "${ISCSI_HELPER}" - -crudini --set $cfg \ - lvm57 \ - volume_group \ - "${CINDER_VOLUME_GROUP}" - -crudini --set $cfg \ - lvm57 \ - volume_driver \ - "${CINDER_VOLUME_DRIVER}" - -crudini --set $cfg \ - lvm57 \ - iscsi_ip_address \ - "${ISCSI_IP_ADDRESS}" - -crudini --set $cfg \ - lvm57 \ - volume_backend_name \ - "${CINDER_VOLUME_BACKEND_NAME}" - -sed -i 's/udev_sync = 1/udev_sync = 0/' /etc/lvm/lvm.conf -sed -i 's/udev_rules = 1/udev_rules = 0/' /etc/lvm/lvm.conf -sed -i 's/use_lvmetad = 1/use_lvmetad = 0/' /etc/lvm/lvm.conf - -#Adding LVM filter -sed -i 's:filter = \[ "a/.\*/" \]:filter = \[ "a/sda/", "r/.\*/"\]:g' /etc/lvm/lvm.conf - -# https://bugs.launchpad.net/kolla/+bug/1461635 -# Cinder requires mounting /dev in the cinder-volume, nova-compute, -# and libvirt containers. If /dev/pts/ptmx does not have proper permissions -# on the host, then libvirt will fail to boot an instance. -# This is a bug in Docker where it is not correctly mounting /dev/pts -# Tech Debt tracker: https://bugs.launchpad.net/kolla/+bug/1468962 -# **Temporary fix** -chmod 666 /dev/pts/ptmx - -#Adding cinder volumes to tgtd config -echo "include /etc/cinder/volumes/*" >> /etc/tgt/tgtd.conf -echo "include /var/lib/cinder/volumes/*" >> /etc/tgt/targets.conf - -echo "Starging iSCSI tgtd" -/opt/kolla/tgtd.sh - -echo "Starting cinder-volume" -exec /usr/bin/cinder-volume --config-file /etc/cinder/cinder.conf diff --git a/docker/common/cinder-app/cinder-volume/start.sh b/docker/common/cinder-app/cinder-volume/start.sh index f6acf61e0..424fdfa7c 100755 --- a/docker/common/cinder-app/cinder-volume/start.sh +++ b/docker/common/cinder-app/cinder-volume/start.sh @@ -8,7 +8,7 @@ ARGS="" # Loading common functions. source /opt/kolla/kolla-common.sh -# Config-internal script exec out of this function, it does not return here. +# Execute config strategy set_configs exec $CMD $ARGS diff --git a/docker/common/cinder-app/cinder-volume/tgtd.sh b/docker/common/cinder-app/cinder-volume/tgtd.sh deleted file mode 100755 index 33d9461a0..000000000 --- a/docker/common/cinder-app/cinder-volume/tgtd.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -set -e - -DESC="target framework daemon" -DAEMON=/usr/sbin/tgtd - -TGTD_CONFIG=/etc/tgt/targets.conf - -echo "Starting tgtd $DESC" -/usr/sbin/tgtd -echo "Set to offline" -tgtadm --op update --mode sys --name State -v offline -echo "Set tgt config" -tgt-admin -e -c $TGTD_CONFIG -echo "Set to ready" -tgtadm --op update --mode sys --name State -v ready diff --git a/docker/common/cinder-app/cinder-volume/volume-group-create.sh b/docker/common/cinder-app/cinder-volume/volume-group-create.sh deleted file mode 100755 index 338850c84..000000000 --- a/docker/common/cinder-app/cinder-volume/volume-group-create.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -# The script will create the cinder-volume volume group that will -# allow cinder to create volumes from a backing file. -# This is based off devstack. -set -e - -backing_file=/opt/data/cinder_volume - -check_required_vars CINDER_LVM_LO_VOLUME_SIZE CINDER_VOLUME_GROUP - -if ! vgs ${CINDER_VOLUME_GROUP}; then - [[ ! -f $backing_file ]] && truncate -s ${CINDER_LVM_LO_VOLUME_SIZE} $backing_file - vg_dev=`losetup -f --show $backing_file` - if ! vgs ${CINDER_VOLUME_GROUP}; then - vgcreate ${CINDER_VOLUME_GROUP} $vg_dev - fi -fi - -# Remove iscsi targets -cinder-rtstool get-targets | xargs -rn 1 cinder-rtstool delete - |
