Watch
0
0
Fork
You've already forked hyperhive
0

ignore a failed warn-only root check: prefix its ExecStartPre with a dash

This commit is contained in:
atlas 2026-10-28 23:52:37 +01:00
commit e0d2350902

View file

@ -6,7 +6,9 @@
# `touch` and `cp` follow links the container planted there. `hive-priv
# check-rootfs` looks at the paths the script touches (rules in
# `hive-priv/src/prestart.rs`). With `--warn-only` it logs each violation at
# warning level and lets the start go on; the agent containers run it strict
# warning level and lets the start go on. The line carries systemd's `-`
# prefix, so a crash or a failed exec of the check cannot fail the start either.
# The agent containers run it strict
# from their per-agent drop-in (hive-priv's `WriteResourceLimits`).
#
# Pure function, not a NixOS module. A container's module calls it with its
@ -26,7 +28,7 @@
# Attributes for `systemd.services."container@<name>"`.
warnOnly = name: {
serviceConfig.ExecStartPre = [
"${config.services.hyperhive.c0re.package}/bin/hive-priv check-rootfs --warn-only ${name}"
"-${config.services.hyperhive.c0re.package}/bin/hive-priv check-rootfs --warn-only ${name}"
];
};
}