Skip to content

Commit 9f29f9c

Browse files
committed
wip: update service files to match upstream
* MountFlags=slave preventing us from using live restore functionality moby/moby#22806 (comment) https://access.redhat.com/articles/2938171 * LimitNOFILE=infinity LimitNPROC=infinity not-insignificant performance overhead due to limits being propagated to all children (containerd + containers) moby/moby@8db6109 * Delegate=yes allow docker to manage it's cgroup subtree without systemd interference moby/moby#20152 moby/moby@d16737f * TasksMax=infinity prevent systemd from setting a default task limit of 512 on the engine cgroup, on linux >=4.3 systemd/systemd#1239 systemd/systemd#1886
1 parent 9a4257b commit 9f29f9c

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

meta-balena-common/recipes-containers/balena/balena/balena-host.service

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,14 @@ EnvironmentFile=-/etc/docker/balenahost.env
1313
ExecStart=/usr/bin/balenad --delta-data-root=/mnt/sysroot/active/balena --delta-storage-driver=@BALENA_STORAGE@ --log-driver=journald -s @BALENA_STORAGE@ --data-root=/mnt/sysroot/inactive/balena -H fd:// --pidfile=/var/run/balena-host.pid --exec-root=/var/run/balena-host --bip 10.114.101.1/24 --fixed-cidr=10.114.101.128/25 --iptables=false --max-download-attempts=10 --exec-opt native.cgroupdriver=systemd
1414
#Adjust OOMscore to -900 to make killing unlikely
1515
OOMScoreAdjust=-900
16-
MountFlags=slave
1716
LimitNOFILE=1048576
18-
LimitNPROC=1048576
17+
LimitNPROC=infinity
1918
LimitCORE=infinity
19+
TasksMax=infinity
20+
TimeoutStartSec=0
21+
Restart=on-failure
22+
StartLimitBurst=3
23+
StartLimitInterval=30s
24+
Delegate=yes
25+
KillMode=process
2026

meta-balena-common/recipes-containers/balena/balena/balena.service

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,16 @@ ExecStart=/usr/bin/healthdog --healthcheck=/usr/lib/balena/balena-healthcheck /u
1313
ExecStartPost=/bin/bash -c '/usr/lib/balena/balena-healthcheck-image-load &'
1414
#Adjust OOMscore to -900 to make killing unlikely
1515
OOMScoreAdjust=-900
16-
MountFlags=slave
1716
LimitNOFILE=1048576
18-
LimitNPROC=1048576
17+
LimitNPROC=infinity
1918
LimitCORE=infinity
19+
TasksMax=infinity
20+
TimeoutStartSec=0
2021
WatchdogSec=360
2122
Restart=always
23+
StartLimitBurst=3
24+
StartLimitInterval=30s
25+
Delegate=yes
2226
KillMode=process
2327

2428
[Install]

0 commit comments

Comments
 (0)