diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-12-09 20:03:56 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-12-09 20:03:57 +0000 |
| commit | 50a8f78de7ee7bdce5143dd6ece06aaf4bba9812 (patch) | |
| tree | 7d29626d05a422f61ae3435ad690d18bbfa84397 /docker | |
| parent | 3892d60ff372b30fae7d7d078161d1ae99c65157 (diff) | |
| parent | 8105f504d3dac828642657583f1bb6df94b53cc6 (diff) | |
| download | kolla-50a8f78de7ee7bdce5143dd6ece06aaf4bba9812.tar.gz kolla-50a8f78de7ee7bdce5143dd6ece06aaf4bba9812.zip | |
Merge "Fix octavia images"
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/octavia/octavia-api/Dockerfile.j2 | 3 | ||||
| -rw-r--r-- | docker/octavia/octavia-api/extend_start.sh | 8 | ||||
| -rw-r--r-- | docker/octavia/octavia-base/Dockerfile.j2 | 7 | ||||
| -rw-r--r-- | docker/octavia/octavia-base/extend_start.sh | 14 |
4 files changed, 32 insertions, 0 deletions
diff --git a/docker/octavia/octavia-api/Dockerfile.j2 b/docker/octavia/octavia-api/Dockerfile.j2 index 053d355a6..5968aeefb 100644 --- a/docker/octavia/octavia-api/Dockerfile.j2 +++ b/docker/octavia/octavia-api/Dockerfile.j2 @@ -19,6 +19,9 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% endif %} +COPY extend_start.sh /usr/local/bin/kolla_octavia_extend_start +RUN chmod 755 /usr/local/bin/kolla_octavia_extend_start + {% block octavia_api_footer %}{% endblock %} {% block footer %}{% endblock %} diff --git a/docker/octavia/octavia-api/extend_start.sh b/docker/octavia/octavia-api/extend_start.sh new file mode 100644 index 000000000..2692046c9 --- /dev/null +++ b/docker/octavia/octavia-api/extend_start.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases +# of the KOLLA_BOOTSTRAP variable being set, including empty. +if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then + octavia-db-manage upgrade head + exit 0 +fi diff --git a/docker/octavia/octavia-base/Dockerfile.j2 b/docker/octavia/octavia-base/Dockerfile.j2 index 2287b859c..4aed75d44 100644 --- a/docker/octavia/octavia-base/Dockerfile.j2 +++ b/docker/octavia/octavia-base/Dockerfile.j2 @@ -27,4 +27,11 @@ RUN ln -s /octavia-base-source/* octavia \ && chown -R octavia: /etc/octavia {% endif %} + +COPY extend_start.sh /usr/local/bin/kolla_extend_start + +RUN touch /usr/local/bin/kolla_octavia_extend_start \ + && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_octavia_extend_start \ + && usermod -a -G kolla octavia + {% block octavia_base_footer %}{% endblock %} diff --git a/docker/octavia/octavia-base/extend_start.sh b/docker/octavia/octavia-base/extend_start.sh new file mode 100644 index 000000000..dfdaafe8c --- /dev/null +++ b/docker/octavia/octavia-base/extend_start.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -o errexit + +OCTAVIA_LOG_DIR=/var/log/kolla/octavia + +if [[ ! -d "${OCTAVIA_LOG_DIR}" ]]; then + mkdir -p ${OCTAVIA_LOG_DIR} +fi +if [[ $(stat -c %a ${OCTAVIA_LOG_DIR}) != "755" ]]; then + chmod 755 ${OCTAVIA_LOG_DIR} +fi + +. /usr/local/bin/kolla_octavia_extend_start |
