Skip to content
Snippets Groups Projects
Commit e6571c02 authored by Martin André's avatar Martin André
Browse files

Safely create directories

This prevents failure when the directory already exists.

This commit fixes a failure in centos-binary because of a change in the
RDO packaging, where the required directory is now created for us.

Change-Id: Idd3e15802c3e3fd363e1295111ec12948d566781
Closes-Bug: #1543417
parent 815f040e
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,7 @@ done ...@@ -11,7 +11,7 @@ done
docker daemon -s btrfs 2>&1 > docker.log & docker daemon -s btrfs 2>&1 > docker.log &
docker_pid=$! docker_pid=$!
mkdir /var/run/sshd mkdir -p /var/run/sshd
/usr/sbin/sshd -D 2>&1 > sshd.log & /usr/sbin/sshd -D 2>&1 > sshd.log &
sshd_pid=$! sshd_pid=$!
......
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
# of the KOLLA_BOOTSTRAP variable being set, including empty. # of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
sudo chown nova: /var/lib/nova/ sudo chown nova: /var/lib/nova/
mkdir /var/lib/nova/instances mkdir -p /var/lib/nova/instances
# Only update permissions if permissions need to be updated
if [[ $(stat -c %U:%G /var/lib/nova/instances) != "nova:nova" ]]; then
sudo chown nova: /var/lib/nova/instances
fi
exit 0 exit 0
fi fi
...@@ -106,7 +106,7 @@ RUN apt-get install -y --no-install-recommends \ ...@@ -106,7 +106,7 @@ RUN apt-get install -y --no-install-recommends \
ADD openstack-base-archive /openstack-base-source ADD openstack-base-archive /openstack-base-source
RUN ln -s openstack-base-source/* /requirements \ RUN ln -s openstack-base-source/* /requirements \
&& mkdir /var/lib/kolla \ && mkdir -p /var/lib/kolla \
&& curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \ && curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
&& python get-pip.py \ && python get-pip.py \
&& rm get-pip.py \ && rm get-pip.py \
......
...@@ -34,4 +34,4 @@ RUN ln -s swift-base-source/* swift \ ...@@ -34,4 +34,4 @@ RUN ln -s swift-base-source/* swift \
{% endif %} {% endif %}
COPY build-swift-ring.py /usr/local/bin/kolla_build_swift_ring COPY build-swift-ring.py /usr/local/bin/kolla_build_swift_ring
RUN mkdir /opt/swift RUN mkdir -p /opt/swift
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