Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 18 additions & 17 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
#!/bin/bash

echo "Entering $0 at $(date) "

if [ ! -f /sys/fs/cgroup/cgroup.controllers ]; then
echo "Using cgroup v1"
else
echo "Using cgroup v2"
CURRENT_CGROUP=$(cat /proc/self/cgroup | sed 's/0:://')
echo "Current cgroup: ${CURRENT_CGROUP}"

MEMORY_OOM_GROUP_VALUE=$(cat "/sys/fs/cgroup/${CURRENT_CGROUP}/memory.oom.group")
echo "Current memory.oom.group value: ${MEMORY_OOM_GROUP_VALUE}"

if [[ "${MEMORY_OOM_GROUP_VALUE}" == "1" ]]; then
echo "Warning! memory.oom.group is set to 1 for the current cgroup, OOM events will not be handled properly by the platform. \
Set singleProcessOOMKill=true for kubelet configuration to fix it." 1>&2;
fi
fi

DIR=$(dirname $0)

echo "Entering $0 at $(date) "
DOCKERD_DATA_ROOT=${DOCKERD_DATA_ROOT:-/home/rootless/.local/share/docker}
DIND_VOLUME_STAT_DIR=${DIND_VOLUME_STAT_DIR:-${DOCKERD_DATA_ROOT}/dind-volume}
DIND_VOLUME_CREATED_TS_FILE=${DIND_VOLUME_STAT_DIR}/created
Expand Down Expand Up @@ -190,22 +207,6 @@ do

echo "Starting dockerd rootless"

if [ ! -f /sys/fs/cgroup/cgroup.controllers ]; then
echo "Using cgroup v1"
else
echo "Using cgroup v2"
CURRENT_CGROUP=$(cat /proc/self/cgroup | sed 's/0:://')
echo "Current cgroup: ${CURRENT_CGROUP}"

MEMORY_OOM_GROUP_VALUE=$(cat "/sys/fs/cgroup/${CURRENT_CGROUP}/memory.oom.group")
echo "Current memory.oom.group value: ${MEMORY_OOM_GROUP_VALUE}"

if [[ "${MEMORY_OOM_GROUP_VALUE}" == "1" ]]; then
echo "Warning! memory.oom.group is set to 1 for the current cgroup, OOM events will not be handled properly by the platform. \
Set singleProcessOOMKill=true for kubelet configuration to fix it." 1>&2;
fi
fi

export DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS="-p 0.0.0.0:1300:1300/tcp" # Expose rooltelsskit port
dockerd-entrypoint.sh dockerd --feature containerd-snapshotter=false ${DOCKERD_PARAMS} <&- &

Expand Down
2 changes: 1 addition & 1 deletion service.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version: 3.0.10
version: 3.0.11