diff --git a/docker/neutron/neutron-base/Dockerfile.j2 b/docker/neutron/neutron-base/Dockerfile.j2 index 4084544e4b..2c036037ca 100644 --- a/docker/neutron/neutron-base/Dockerfile.j2 +++ b/docker/neutron/neutron-base/Dockerfile.j2 @@ -64,4 +64,5 @@ COPY extend_start.sh /usr/local/bin/kolla_extend_start RUN usermod -a -G kolla neutron \ && chmod 750 /etc/sudoers.d \ && chmod 440 /etc/sudoers.d/neutron_sudoers \ - && chmod 755 /usr/local/bin/kolla_extend_start + && touch /usr/local/bin/kolla_neutron_extend_start \ + && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_neutron_extend_start diff --git a/docker/neutron/neutron-base/extend_start.sh b/docker/neutron/neutron-base/extend_start.sh index 8c71d1a235..e95dd280c6 100644 --- a/docker/neutron/neutron-base/extend_start.sh +++ b/docker/neutron/neutron-base/extend_start.sh @@ -6,3 +6,5 @@ fi if [[ $(stat -c %a /var/log/kolla/neutron) != "755" ]]; then chmod 755 /var/log/kolla/neutron fi + +source /usr/local/bin/kolla_neutron_extend_start diff --git a/docker/neutron/neutron-metadata-agent/Dockerfile.j2 b/docker/neutron/neutron-metadata-agent/Dockerfile.j2 index f8798e93c3..141696b9cc 100644 --- a/docker/neutron/neutron-metadata-agent/Dockerfile.j2 +++ b/docker/neutron/neutron-metadata-agent/Dockerfile.j2 @@ -12,8 +12,8 @@ RUN apt-get install -y --no-install-recommends \ {% endif %} COPY neutron_sudoers /etc/sudoers.d/neutron_sudoers -COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN chmod 755 /usr/local/bin/kolla_extend_start \ +COPY extend_start.sh /usr/local/bin/kolla_neutron_extend_start +RUN chmod 755 /usr/local/bin/kolla_neutron_extend_start \ && chmod 750 /etc/sudoers.d \ && chmod 440 /etc/sudoers.d/neutron_sudoers \ && usermod -a -G kolla neutron diff --git a/docker/neutron/neutron-metadata-agent/extend_start.sh b/docker/neutron/neutron-metadata-agent/extend_start.sh index aed5134a89..c46f60f555 100644 --- a/docker/neutron/neutron-metadata-agent/extend_start.sh +++ b/docker/neutron/neutron-metadata-agent/extend_start.sh @@ -4,10 +4,3 @@ if [[ $(stat -c %U:%G /var/lib/neutron/kolla) != "neutron:neutron" ]]; then sudo chown neutron: /var/lib/neutron/kolla fi - -if [[ ! -d "/var/log/kolla/neutron" ]]; then - mkdir -p /var/log/kolla/neutron -fi -if [[ $(stat -c %a /var/log/kolla/neutron) != "755" ]]; then - chmod 755 /var/log/kolla/neutron -fi diff --git a/docker/neutron/neutron-server/Dockerfile.j2 b/docker/neutron/neutron-server/Dockerfile.j2 index 6540345db7..6fbfb2e2df 100644 --- a/docker/neutron/neutron-server/Dockerfile.j2 +++ b/docker/neutron/neutron-server/Dockerfile.j2 @@ -2,8 +2,8 @@ FROM {{ namespace }}/{{ image_prefix }}neutron-base:{{ tag }} MAINTAINER {{ maintainer }} ADD plugins-archive / -COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN chmod 755 /usr/local/bin/kolla_extend_start \ +COPY extend_start.sh /usr/local/bin/kolla_neutron_extend_start +RUN chmod 755 /usr/local/bin/kolla_neutron_extend_start \ && if [ "$(ls /plugins)" ]; then \ pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /plugins/*; \ fi diff --git a/docker/neutron/neutron-server/extend_start.sh b/docker/neutron/neutron-server/extend_start.sh index 7247c8de5f..dba1e632f2 100644 --- a/docker/neutron/neutron-server/extend_start.sh +++ b/docker/neutron/neutron-server/extend_start.sh @@ -1,12 +1,5 @@ #!/bin/bash -if [[ ! -d "/var/log/kolla/neutron" ]]; then - mkdir -p /var/log/kolla/neutron -fi -if [[ $(stat -c %a /var/log/kolla/neutron) != "755" ]]; then - chmod 755 /var/log/kolla/neutron -fi - # 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