Skip to content

Commit

Permalink
Fix cgroup tmpfs mount, drop hardcoded --no-deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
discordianfish committed Apr 28, 2019
1 parent 3fd180e commit 1571b87
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions files/etc/init.d/k3s
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ ensure_cgroup_mount() {
# Unmount /sys/fs/cgroup if mounted as cgroup
grep ' /sys/fs/cgroup cgroup' /proc/self/mounts && umount /sys/fs/cgroup

mount -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup
grep ' /sys/fs/cgroup tmpfs' /proc/self/mounts \
|| mount -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup

for sys in $(awk '!/^#/ { if ($4 == 1) print $1 }' /proc/cgroups); do
mnt="/sys/fs/cgroup/$sys"
grep -q "cgroup $mnt " /proc/self/mounts && continue
Expand All @@ -22,7 +24,7 @@ ensure_cgroup_mount() {
start() {
ensure_cgroup_mount
start-stop-daemon -S -b -x "$EXEC" -m -p "$PIDFILE" \
-- server $(uci_get k3s.globals.opts) --no-deploy traefik \
-- server $(uci_get k3s.globals.opts) \
--data-dir $(uci_get k3s.globals.root)
}

Expand Down

0 comments on commit 1571b87

Please sign in to comment.