Skip to content

Commit 35647bc

Browse files
committed
fix: log aggregator may fail in restricted docker hosts
We are setting a USER in our Dockerfile that does not seem to work with containers secured by a SELinux host.
1 parent b2c5b97 commit 35647bc

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

deploy/log-aggregator/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ RUN apt update && apt -y install sudo curl procps inotify-tools \
2424
&& codeflare -n util/websocat \
2525
&& codeflare -n kubernetes/kubectl
2626

27-
USER codeflare
28-
WORKDIR /home/codeflare
27+
#USER codeflare
28+
WORKDIR /home/node
2929

3030
CMD exec /bin/bash -c "trap : TERM INT; sleep infinity & wait"
3131
# ENTRYPOINT ["codeflare", "-y", "-p", "default", "ml/ray/aggregator/with-jobid"]

deploy/log-aggregator/wait-for.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
#!/usr/bin/env bash
22

33
F="$1"
4+
D=$(dirname $F)
45

56
# wait for the file to exist and be non-empty
67
while [ ! -s "$F" ]; do
7-
mkdir -p $(dirname $F)
8-
inotifywait -qq -e create -e modify "$(dirname $F)"
8+
if [ ! -d "$D" ]; then mkdir -p "$D" || break; fi
9+
inotifywait -qq -e create -e modify "$D"
910
done
11+
12+
echo "Error in watch"
13+
exit 1

0 commit comments

Comments
 (0)