Skip to content

Commit 470c1eb

Browse files
Pothulapatiroboquat
authored andcommitted
[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 <[email protected]> update k3s image Signed-off-by: Tarun Pothulapati <[email protected]>
1 parent 3fe748c commit 470c1eb

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

install/preview/entrypoint.sh

+3-11
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ if [ "$1" != "logging" ]; then
1818
exit
1919
fi
2020

21-
# fail if its arm64
22-
if [ "$(uname -m)" = 'arm64' ]; then
23-
echo "Gitpod local preview does not work on arm64 CPU's (including M1 Mac's)"
24-
exit 1
25-
fi
26-
2721
# check for minimum requirements
2822
REQUIRED_MEM_KB=$((6 * 1024 * 1024))
2923
total_mem_kb=$(awk '/MemTotal:/ {print $2}' /proc/meminfo)
@@ -43,17 +37,15 @@ fi
4337

4438
echo "Gitpod Domain: $DOMAIN"
4539

40+
# With cgroupv2, We need to move the k3s processes into the
41+
# init group when we override the entrypoint in the container
4642
if [ -f /sys/fs/cgroup/cgroup.controllers ]; then
47-
echo "[$(date -Iseconds)] [CgroupV2 Fix] Evacuating Root Cgroup ..."
48-
# move the processes from the root group to the /init group,
49-
# otherwise writing subtree_control fails with EBUSY.
5043
mkdir -p /sys/fs/cgroup/init
5144
busybox xargs -rn1 < /sys/fs/cgroup/cgroup.procs > /sys/fs/cgroup/init/cgroup.procs || :
52-
# enable controllers
5345
sed -e 's/ / +/g' -e 's/^/+/' <"/sys/fs/cgroup/cgroup.controllers" >"/sys/fs/cgroup/cgroup.subtree_control"
54-
echo "[$(date -Iseconds)] [CgroupV2 Fix] Done"
5546
fi
5647

48+
5749
mount --make-shared /sys/fs/cgroup
5850
mount --make-shared /proc
5951
mount --make-shared /var/gitpod

0 commit comments

Comments
 (0)