Let SIGTERM cancel a running pass and bound nfs-server's clean-up at 10 s, so a hanging command cannot keep the export file past the stop timeout

This commit is contained in:
jochen
2026-10-09 14:43:32 +02:00
parent 87d6a5549c
commit 72a6d062dc
5 changed files with 118 additions and 5 deletions
+7
View File
@@ -102,6 +102,13 @@ its config file, so on unassignment the config file is gone when the process is
removes its export file — the one removal its code makes — and runs `exportfs -ra`, so the kernel lets the
shares go. A plain restart, a push or a shutdown leaves the config file in place, and the exports stay.
**Within the stop timeout.** The service manager kills a process that has not stopped 90 s after SIGTERM
(mesh-host #62), and a killed process cleans up nothing. So SIGTERM ends a running pass at once (its
commands and its look below a share are cancelled, and it writes nothing), and the clean-up has its own
bound of 10 s: the export file is removed first, which needs no command, then `exportfs -ra` runs within
that bound. Whatever it could not finish is logged as `nfs-server: UNASSIGNED, NOT CLEAN: …`, with what a
person must do.
## What it leaves
- **A subfolder export shares its filesystem.** A share that is a folder inside a larger filesystem (not
a filesystem of its own) is exported with `no_subtree_check`, so a client that forges file handles could