From ec272b8fe4da85351d549022829c6a2329666376 Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Fri, 7 Aug 2015 09:02:07 -0700 Subject: [PATCH] Remove config-internal from cinder Partially-Implements: blueprint remove-config-internal Change-Id: Ic6b7cb217a126c53c0055dbcac4d345583599eb1 --- .../binary/cinder-app/cinder-api/Dockerfile | 2 +- .../cinder-app/cinder-api/config-internal.sh | 1 - .../cinder-backup/config-internal.sh | 1 - .../binary/cinder-app/cinder-base/Dockerfile | 3 - .../cinder-app/cinder-base/config-cinder.sh | 1 - .../cinder-app/cinder-scheduler/Dockerfile | 2 +- .../cinder-scheduler/config-internal.sh | 1 - .../cinder-app/cinder-volume/Dockerfile | 2 +- .../cinder-volume/config-internal.sh | 1 - .../binary/cinder-app/cinder-volume/tgtd.sh | 1 - .../cinder-volume/volume-group-create.sh | 1 - .../source/cinder-app/cinder-api/Dockerfile | 2 +- .../cinder-app/cinder-api/config-internal.sh | 1 - .../cinder-app/cinder-backup/Dockerfile | 2 +- .../cinder-backup/config-internal.sh | 1 - .../source/cinder-app/cinder-base/Dockerfile | 3 - .../cinder-app/cinder-base/config-cinder.sh | 1 - .../cinder-app/cinder-scheduler/Dockerfile | 2 +- .../cinder-scheduler/config-internal.sh | 1 - .../cinder-app/cinder-volume/Dockerfile | 2 +- .../cinder-volume/config-internal.sh | 1 - .../source/cinder-app/cinder-volume/tgtd.sh | 1 - .../cinder-volume/volume-group-create.sh | 1 - .../cinder-app/cinder-api/config-internal.sh | 77 --------- docker/common/cinder-app/cinder-api/start.sh | 2 +- .../cinder-backup/config-internal.sh | 47 ------ .../common/cinder-app/cinder-backup/start.sh | 2 +- .../cinder-app/cinder-base/config-cinder.sh | 157 ------------------ .../cinder-scheduler/config-internal.sh | 35 ---- .../cinder-app/cinder-scheduler/start.sh | 2 +- .../cinder-volume/config-internal.sh | 98 ----------- .../common/cinder-app/cinder-volume/start.sh | 2 +- .../common/cinder-app/cinder-volume/tgtd.sh | 17 -- .../cinder-volume/volume-group-create.sh | 22 --- 34 files changed, 11 insertions(+), 484 deletions(-) delete mode 120000 docker/centos/binary/cinder-app/cinder-api/config-internal.sh delete mode 120000 docker/centos/binary/cinder-app/cinder-backup/config-internal.sh delete mode 120000 docker/centos/binary/cinder-app/cinder-base/config-cinder.sh delete mode 120000 docker/centos/binary/cinder-app/cinder-scheduler/config-internal.sh delete mode 120000 docker/centos/binary/cinder-app/cinder-volume/config-internal.sh delete mode 120000 docker/centos/binary/cinder-app/cinder-volume/tgtd.sh delete mode 120000 docker/centos/binary/cinder-app/cinder-volume/volume-group-create.sh delete mode 120000 docker/centos/source/cinder-app/cinder-api/config-internal.sh delete mode 120000 docker/centos/source/cinder-app/cinder-backup/config-internal.sh delete mode 120000 docker/centos/source/cinder-app/cinder-base/config-cinder.sh delete mode 120000 docker/centos/source/cinder-app/cinder-scheduler/config-internal.sh delete mode 120000 docker/centos/source/cinder-app/cinder-volume/config-internal.sh delete mode 120000 docker/centos/source/cinder-app/cinder-volume/tgtd.sh delete mode 120000 docker/centos/source/cinder-app/cinder-volume/volume-group-create.sh delete mode 100755 docker/common/cinder-app/cinder-api/config-internal.sh delete mode 100755 docker/common/cinder-app/cinder-backup/config-internal.sh delete mode 100755 docker/common/cinder-app/cinder-base/config-cinder.sh delete mode 100755 docker/common/cinder-app/cinder-scheduler/config-internal.sh delete mode 100755 docker/common/cinder-app/cinder-volume/config-internal.sh delete mode 100755 docker/common/cinder-app/cinder-volume/tgtd.sh delete mode 100755 docker/common/cinder-app/cinder-volume/volume-group-create.sh diff --git a/docker/centos/binary/cinder-app/cinder-api/Dockerfile b/docker/centos/binary/cinder-app/cinder-api/Dockerfile index c96caaeccb..98899a79bf 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 d929c89b20..0000000000 --- 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 5f135c63bb..0000000000 --- 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 e14b792b07..fb8dea608e 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 22722c185b..0000000000 --- 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 43994f1238..70b8d82026 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 f3792cd9c4..0000000000 --- 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 581f9e03aa..17412fefae 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 4739be2fc5..0000000000 --- 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 f0c8855777..0000000000 --- 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 eeeca7063e..0000000000 --- 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 8ac5053de7..3ce6120461 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 d929c89b20..0000000000 --- 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 43994f1238..70b8d82026 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 5f135c63bb..0000000000 --- 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 2c1d33977a..dd6d8a5bfa 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 22722c185b..0000000000 --- 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 43994f1238..70b8d82026 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 f3792cd9c4..0000000000 --- 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 83ce3f604e..c7d6c94467 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 4739be2fc5..0000000000 --- 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 f0c8855777..0000000000 --- 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 eeeca7063e..0000000000 --- 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 158d1efe13..0000000000 --- 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 4385d06311..e6f79b3a65 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 bd1dda9fa9..0000000000 --- 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 1cc902db67..748c47d91a 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 a49b17f07a..0000000000 --- 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 <> /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 f6acf61e0c..424fdfa7cf 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 33d9461a05..0000000000 --- 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 338850c845..0000000000 --- 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 -