diff options
author | Albin Vass <albin.vass@zenseact.com> | 2022-03-24 17:38:36 +0100 |
---|---|---|
committer | Albin Vass <albin.vass@zenseact.com> | 2022-03-25 08:45:19 +0100 |
commit | 0cb099e1beaa804d8a03492493db4a9dd56be900 (patch) | |
tree | aab392436091f0e8320fd9e478021ec5be7841a0 | |
parent | 3bce9b6d3efeffce68128136b2fc0330107b79cc (diff) | |
download | zuul-0cb099e1beaa804d8a03492493db4a9dd56be900.tar.gz |
Start zookeeper with users uid in test-setup-docker.sh
The zookeeper containers entrypoint will try to switch to the user
'zookeeper' if the container is started with uid '0'. This can cause issues
when the uid for the zookeeper user inside the container and the
users uid outside the container differ since it will lead to zookeeper
getting access denied when trying to read the certificates.
This also adds logging configuration to make it easier to debug
zookeeper in the future.
Change-Id: I51db53fe093a294e804148f682053123f54adfe1
-rw-r--r-- | tools/docker-compose.yaml | 5 | ||||
-rwxr-xr-x | tools/test-setup-docker.sh | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tools/docker-compose.yaml b/tools/docker-compose.yaml index fbf5ad280..83ab9f930 100644 --- a/tools/docker-compose.yaml +++ b/tools/docker-compose.yaml @@ -26,6 +26,7 @@ services: zookeeper: container_name: zuul-test-zookeeper + user: "${USER_ID}" image: zookeeper environment: - ZOO_AUTOPURGE_PURGEINTERVAL=1 @@ -33,8 +34,8 @@ services: ports: - "2281:2281" tmpfs: - - /data - - /datalog + - /data:uid=${USER_ID} + - /datalog:uid=${USER_ID} volumes: - "./ca:/var/certs:z" - "./zoo.cfg:/conf/zoo.cfg:z" diff --git a/tools/test-setup-docker.sh b/tools/test-setup-docker.sh index 526f025c7..b90a422c2 100755 --- a/tools/test-setup-docker.sh +++ b/tools/test-setup-docker.sh @@ -39,6 +39,7 @@ CA_DIR=$SCRIPT_DIR/ca mkdir -p $CA_DIR $SCRIPT_DIR/zk-ca.sh $CA_DIR zuul-test-zookeeper +export USER_ID=$(id -u) ${COMPOSE} up -d echo "Waiting for mysql" |