Skip to content

Commit 9ad6aa4

Browse files
committed
permission issues fix for podman in ci
Signed-off-by: Gerd Oberlechner <goberlec@redhat.com>
1 parent 0998b25 commit 9ad6aa4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test-integration/hack/_emulator_handling.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,15 @@ start_emulator() {
5656
local container_image="mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:vnext-preview"
5757
local ready_log_message="PostgreSQL and pgcosmos extension are ready"
5858

59+
# Pull with ignore_chown_errors to work around the vnext image containing a
60+
# /home/nonroot dir owned by UID 65532. In OpenShift CI the nested-podman pod
61+
# user namespace only maps UIDs 0-65535 and rootless podman cannot map 65532
62+
# into that range, causing lchown to fail. The emulator runs as UID 1000
63+
# (cosmosdev) and never touches /home/nonroot, so ignoring the error is safe.
64+
if [ "${CONTAINER_RUNTIME}" = "podman" ]; then
65+
${CONTAINER_RUNTIME} pull --storage-opt ignore_chown_errors=true "${container_image}"
66+
fi
67+
5968
echo "Starting Cosmos DB emulator with container name: ${container_name}"
6069
${CONTAINER_RUNTIME} run \
6170
--publish 8081:8081 \

0 commit comments

Comments
 (0)