I was able to re-produce this in a different way, but I'm pretty sure it's the same bug that affects you. For scope units in particular, the RuntimeMaxSec property is not applied correctly when systemd is reloaded. E.g., if I run:
Then foo-1.scope just keeps running. The setting is applied correctly if I restart foo-1.scope, however. Running the same test for a service unit results in the RuntimeMaxSec value being applied correctly, and the unit is terminated.
I have built and tested a fix in ppa:enr0n/systemd-251. Does that fix your issue?
I was able to re-produce this in a different way, but I'm pretty sure it's the same bug that affects you. For scope units in particular, the RuntimeMaxSec property is not applied correctly when systemd is reloaded. E.g., if I run:
$ systemd-run --scope -u foo-1.scope /usr/bin/foo system/ foo-.scope. d/ system/ foo-.scope. d/override. conf << EOF
$ mkdir -p /etc/systemd/
$ cat > /etc/systemd/
[Scope]
RuntimeMaxSec=10s
$ systemctl daemon-reload
Then foo-1.scope just keeps running. The setting is applied correctly if I restart foo-1.scope, however. Running the same test for a service unit results in the RuntimeMaxSec value being applied correctly, and the unit is terminated.
I have built and tested a fix in ppa:enr0n/ systemd- 251. Does that fix your issue?