Remove duplicate code in nova extend_start.sh
Change-Id: I37d737509bc7cf3dc74bb13ecb0a6ae68080556e Partial-Bug: #1546944
This commit is contained in:
parent
33fd50e603
commit
ede53b1dcb
@ -17,8 +17,8 @@ RUN apt-get install -y --no-install-recommends \
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
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_nova_extend_start
|
||||
RUN chmod 755 /usr/local/bin/kolla_nova_extend_start
|
||||
|
||||
{{ include_footer }}
|
||||
|
||||
|
@ -1,12 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ ! -d "/var/log/kolla/nova" ]]; then
|
||||
mkdir -p /var/log/kolla/nova
|
||||
fi
|
||||
if [[ $(stat -c %a /var/log/kolla/nova) != "755" ]]; then
|
||||
chmod 755 /var/log/kolla/nova
|
||||
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
|
||||
|
@ -56,6 +56,8 @@ RUN chmod 750 /etc/sudoers.d \
|
||||
{% endif %}
|
||||
|
||||
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
||||
RUN chmod 755 /usr/local/bin/kolla_extend_start
|
||||
|
||||
RUN touch /usr/local/bin/kolla_nova_extend_start \
|
||||
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_nova_extend_start
|
||||
|
||||
RUN usermod -a -G kolla nova
|
||||
|
@ -6,3 +6,5 @@ fi
|
||||
if [[ $(stat -c %a /var/log/kolla/nova) != "755" ]]; then
|
||||
chmod 755 /var/log/kolla/nova
|
||||
fi
|
||||
|
||||
source /usr/local/bin/kolla_nova_extend_start
|
||||
|
@ -52,8 +52,8 @@ RUN /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements
|
||||
{% endif %}
|
||||
|
||||
COPY nova_compute_sudoers /etc/sudoers.d/nova_compute_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_nova_extend_start
|
||||
RUN chmod 755 /usr/local/bin/kolla_nova_extend_start \
|
||||
&& chmod 750 /etc/sudoers.d \
|
||||
&& chmod 440 /etc/sudoers.d/nova_compute_sudoers \
|
||||
&& rm -f /etc/machine-id
|
||||
|
@ -1,13 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
if [[ ! -d "/var/log/kolla/nova" ]]; then
|
||||
mkdir -p /var/log/kolla/nova
|
||||
fi
|
||||
if [[ $(stat -c %a /var/log/kolla/nova) != "755" ]]; then
|
||||
chmod 755 /var/log/kolla/nova
|
||||
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
|
||||
|
@ -30,8 +30,8 @@ RUN apt-get install -y --no-install-recommends \
|
||||
|
||||
{% endif %}
|
||||
|
||||
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_nova_extend_start
|
||||
RUN chmod 755 /usr/local/bin/kolla_nova_extend_start \
|
||||
&& useradd --user-group nova
|
||||
|
||||
{{ include_footer }}
|
@ -12,10 +12,3 @@ fi
|
||||
if [[ $(lsmod | grep xenfs) ]]; then
|
||||
mount -t xenfs xenfs /proc/xen
|
||||
fi
|
||||
|
||||
if [[ ! -d "/var/log/kolla/nova" ]]; then
|
||||
mkdir -p /var/log/kolla/nova
|
||||
fi
|
||||
if [[ $(stat -c %a /var/log/kolla/nova) != "755" ]]; then
|
||||
chmod 755 /var/log/kolla/nova
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user