diff mbox series

[v2,3/3] meta/conf/fragments/yocto/monitor-disk-space.conf: add fragment

Message ID 20260825-sbom-cve-check-fragment-desc-v2-3-01c3823eb780@bootlin.com
State Under Review
Headers show
Series Disk space monitoring fragment and minor tooling tweaks | expand

Commit Message

Antonin Godard Aug. 25, 2026, 6:55 a.m. UTC
Add a "core/yocto/monitor-disk-space" fragment to enable the
functionality previously provided by the default definition of
BB_DISKMON_DIRS in local.conf.sample. As the definition might not be
obvious to set, having a simple way of enabling the feature through a
fragment makes it more approachable.

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
 meta/conf/fragments/yocto/monitor-disk-space.conf | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
diff mbox series

Patch

diff --git a/meta/conf/fragments/yocto/monitor-disk-space.conf b/meta/conf/fragments/yocto/monitor-disk-space.conf
new file mode 100644
index 0000000000..1118e6e221
--- /dev/null
+++ b/meta/conf/fragments/yocto/monitor-disk-space.conf
@@ -0,0 +1,18 @@ 
+BB_CONF_FRAGMENT_SUMMARY = "Monitor disk space during the build"
+BB_CONF_FRAGMENT_DESCRIPTION = "Monitor the disk space during the build. If \
+there is less that 1GB of space or less than 100K inodes in any key build \
+location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully shutdown the build. If there \
+is less than 100MB or 1K inodes, perform a hard halt of the build: running \
+completely out of space can corrupt files and can make unrecoverable damages to \
+the build. It's also necessary to monitor /tmp as otherwise build will fail with \
+exotic errors."
+
+BB_DISKMON_DIRS = "\
+    STOPTASKS,${TMPDIR},1G,100K \
+    STOPTASKS,${DL_DIR},1G,100K \
+    STOPTASKS,${SSTATE_DIR},1G,100K \
+    STOPTASKS,/tmp,100M,100K \
+    HALT,${TMPDIR},100M,1K \
+    HALT,${DL_DIR},100M,1K \
+    HALT,${SSTATE_DIR},100M,1K \
+    HALT,/tmp,10M,1K"