Skip to content

Commit

Permalink
Workaround cgroupsv2
Browse files Browse the repository at this point in the history
  • Loading branch information
ktf committed Jun 25, 2024
1 parent 7b95cd1 commit 4400af0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ci/build-loop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ fi
# properly when we exit (or are killed), and it can track CPU/RAM usage.
# Run our Docker builds inside the same cgroup so they're included too.
if cgroup=$(sed -rn '/:freezer:/{s/.*:freezer:(.*)/\1/p;q}' "/proc/$$/cgroup"); then
DOCKER_EXTRA_ARGS="$DOCKER_EXTRA_ARGS ${cgroup:+--cgroup-parent=$cgroup}"
case $cgroup in
/) DOCKER_EXTRA_ARGS="$DOCKER_EXTRA_ARGS ${NOMAD_PARENT_CGROUP:+--cgroup-parent=$NOMAD_PARENT_CGROUP}" ;;
*) DOCKER_EXTRA_ARGS="$DOCKER_EXTRA_ARGS ${cgroup:+--cgroup-parent=$cgroup}" ;;
esac
fi

if ! clean_env short_timeout aliDoctor --defaults "$ALIBUILD_DEFAULTS" "$PACKAGE" \
Expand Down

0 comments on commit 4400af0

Please sign in to comment.