From fce174b7f995973c04579e098d6d4ff3374e7ed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dulko?= Date: Fri, 9 Mar 2018 12:45:04 +0100 Subject: [PATCH] Create lockfiles directory in CNI Dockerfile This commit adds creating a directory for lockfiles in the CNI Docker image. As in oslo.concurrency `lock_path` option defaults to `OSLO_LOCK_PATH` environment variable, this variable is also set to point to that directory. Change-Id: Ia69c75c34a8da4281414395805f4927de1e91a39 Closes-Bug: 1754636 --- cni.Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cni.Dockerfile b/cni.Dockerfile index 55985345a..2a6271e9f 100644 --- a/cni.Dockerfile +++ b/cni.Dockerfile @@ -1,6 +1,8 @@ FROM centos:7 LABEL authors="Antoni Segura Puimedon, Vikas Choudhary" +ARG OSLO_LOCK_PATH=/var/kuryr-lock + RUN yum install -y epel-release https://rdoproject.org/repos/rdo-release.rpm \ && yum install -y --setopt=tsflags=nodocs python-pip iproute bridge-utils openvswitch sudo \ && yum install -y --setopt=tsflags=nodocs gcc python-devel git \ @@ -13,7 +15,8 @@ RUN cd /opt/kuryr-kubernetes \ && /kuryr-kubernetes/bin/pip install . \ && virtualenv --relocatable /kuryr-kubernetes \ && rm -fr .git \ - && yum -y history undo last + && yum -y history undo last \ + && mkdir ${OSLO_LOCK_PATH} COPY ./cni_ds_init /usr/bin/cni_ds_init @@ -23,6 +26,7 @@ ARG CNI_BIN_DIR_PATH=/opt/cni/bin ENV CNI_BIN_DIR_PATH ${CNI_BIN_DIR_PATH} ARG CNI_DAEMON=False ENV CNI_DAEMON ${CNI_DAEMON} +ENV OSLO_LOCK_PATH=${OSLO_LOCK_PATH} VOLUME [ "/sys/fs/cgroup" ] ENTRYPOINT [ "cni_ds_init" ]