Skip to content

Commit 9d9c50d

Browse files
committed
OCPBUGS-62790: Use separate fs for ostree checkout on live ISO
Installations using ABI/assisted with 16GiB of RAM on the bootstrap node were failing with "no space left on device" during bootstrapping. The live ISO environment uses a tmpfs mounted at /var that is sized at 50% of available RAM. On systems with 16GiB of RAM, this provides only 8GiB of tmpfs space. At the beginning of the bootstrap process, node-image-pull.sh creates an ostree checkout underneath /var/ostree-container. When this is added to the regular disk space usage of the later parts of the bootstrap, the peak tmpfs usage hits around 9.4GiB. This fix creates a separate 5GiB tmpfs to house /var/ostree-container, so that it is not subject to the limits on the size of /var.
1 parent 131985a commit 9d9c50d

File tree

4 files changed

+31
-0
lines changed

4 files changed

+31
-0
lines changed

data/data/bootstrap/files/etc/systemd/system/node-image-pull.service

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[Unit]
22
Description=Node Image Pull
3+
WantsMountsFor=/var/ostree-container
34
Requires=network.target NetworkManager.service
45
After=network.target
56

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[Unit]
2+
ConditionPathExists=/run/ostree-live
3+
RequiresMountsFor=/run/ostree_base
4+
5+
[Service]
6+
Type=oneshot
7+
RemainAfterExit=true
8+
9+
ExecStart=/bin/bash -c 'set -eu; /bin/truncate -s $$(($$(stat -f -c "%%b * %%s / 1024" /run/ostree_base)))k /run/ostree_base/loopfs'
10+
ExecStart=/sbin/mkfs.xfs /run/ostree_base/loopfs
11+
ExecStart=/bin/mkdir /var/ostree-container
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[Unit]
2+
RequiresMountsFor=/run
3+
ConditionPathExists=/run/ostree-live
4+
5+
[Mount]
6+
What=tmpfs
7+
Where=/run/ostree_base
8+
Type=tmpfs
9+
Options=size=5G
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[Unit]
2+
ConditionPathExists=/run/ostree-live
3+
Requires=ostree-mkfs.service
4+
After=ostree-mkfs.service
5+
6+
[Mount]
7+
What=/run/ostree_base/loopfs
8+
Where=/var/ostree-container
9+
Type=xfs
10+
Options=loop,discard

0 commit comments

Comments
 (0)