Remove duplicate code in neutron extend_start.sh
Change-Id: I74aa68d809e9b38a605093abc4e2b8ca14335dee Partial-Bug: #1546944
This commit is contained in:
parent
3f8bc07270
commit
509acbb83f
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user