From 36ff04cd5aea61195fde39c61c25582bddaa8cff Mon Sep 17 00:00:00 2001 From: Tarun Pothulapati Date: Tue, 30 Aug 2022 03:43:24 +0000 Subject: [PATCH] [local-preview] Remove unused dead code This PR removes the unnecessary dead code in the `entrypoint.sh` that isn't actually useful anymore, or become stale. Signed-off-by: Tarun Pothulapati update k3s image Signed-off-by: Tarun Pothulapati --- install/preview/entrypoint.sh | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/install/preview/entrypoint.sh b/install/preview/entrypoint.sh index fc5eaf7b622e80..30ee3ee22b89ad 100755 --- a/install/preview/entrypoint.sh +++ b/install/preview/entrypoint.sh @@ -18,12 +18,6 @@ if [ "$1" != "logging" ]; then exit fi -# fail if its arm64 -if [ "$(uname -m)" = 'arm64' ]; then - echo "Gitpod local preview does not work on arm64 CPU's (including M1 Mac's)" - exit 1 -fi - # check for minimum requirements REQUIRED_MEM_KB=$((6 * 1024 * 1024)) total_mem_kb=$(awk '/MemTotal:/ {print $2}' /proc/meminfo) @@ -43,17 +37,15 @@ fi echo "Gitpod Domain: $DOMAIN" +# With cgroupv2, We need to move the k3s processes into the +# init group when we override the entrypoint in the container if [ -f /sys/fs/cgroup/cgroup.controllers ]; then - echo "[$(date -Iseconds)] [CgroupV2 Fix] Evacuating Root Cgroup ..." - # move the processes from the root group to the /init group, - # otherwise writing subtree_control fails with EBUSY. mkdir -p /sys/fs/cgroup/init busybox xargs -rn1 < /sys/fs/cgroup/cgroup.procs > /sys/fs/cgroup/init/cgroup.procs || : - # enable controllers sed -e 's/ / +/g' -e 's/^/+/' <"/sys/fs/cgroup/cgroup.controllers" >"/sys/fs/cgroup/cgroup.subtree_control" - echo "[$(date -Iseconds)] [CgroupV2 Fix] Done" fi + mount --make-shared /sys/fs/cgroup mount --make-shared /proc mount --make-shared /var/gitpod