Skip to content
Snippets Groups Projects
Commit edaf162e authored by Jenkins's avatar Jenkins Committed by Gerrit Code Review
Browse files

Merge "Remove duplicate code in neutron extend_start.sh"

parents bbed8e92 509acbb8
No related branches found
No related tags found
No related merge requests found
......@@ -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
......@@ -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
......@@ -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
......
......@@ -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
......@@ -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
......
#!/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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment