hive-bash-daemon: keep sibling tasks alive when one is OOM-killed
systemd's default OOMPolicy=stop ends the whole unit when the kernel kills any process in it; set continue, as hive-subagent-daemon does. Module-eval case asserts it.
This commit is contained in:
parent
1b061fc9d5
commit
c1672218b1
2 changed files with 12 additions and 0 deletions
|
|
@ -30,6 +30,7 @@ let
|
|||
|
||||
agentUncapped = agent { };
|
||||
|
||||
agentBashDaemon = machine: machine.systemd.services.hive-bash-daemon;
|
||||
agentSubagentDaemon = machine: machine.systemd.services.hive-subagent-daemon;
|
||||
cases = [
|
||||
{
|
||||
|
|
@ -82,6 +83,12 @@ let
|
|||
name = "one subagent losing the OOM draw does not stop the daemon";
|
||||
ok = (agentSubagentDaemon agentUncapped).serviceConfig.OOMPolicy == "continue";
|
||||
}
|
||||
{
|
||||
# Each bash task is a process in the daemon's cgroup; under `stop` one
|
||||
# OOM-killed task would end every running sibling task.
|
||||
name = "one bash task losing the OOM draw does not stop the daemon";
|
||||
ok = (agentBashDaemon agentUncapped).serviceConfig.OOMPolicy or null == "continue";
|
||||
}
|
||||
];
|
||||
in
|
||||
runGroup "agent-memory" cases
|
||||
|
|
|
|||
Loading…
Reference in a new issue