From df4ff9213384f3c491866e6cf5063aee43456951 Mon Sep 17 00:00:00 2001 From: j4n Date: Mon, 20 Apr 2026 10:54:15 +0200 Subject: [PATCH] fix(dovecot): handle missing inotify sysctl keys in containers Docker containers may not expose fs.inotify.* sysctl keys at all, causing a KeyError before the existing container guard could skip them. --- cmdeploy/src/cmdeploy/dovecot/deployer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmdeploy/src/cmdeploy/dovecot/deployer.py b/cmdeploy/src/cmdeploy/dovecot/deployer.py index 0b9b7764..37215d35 100644 --- a/cmdeploy/src/cmdeploy/dovecot/deployer.py +++ b/cmdeploy/src/cmdeploy/dovecot/deployer.py @@ -186,7 +186,7 @@ def _configure_dovecot(config: Config, debug: bool = False) -> tuple[bool, bool] can_modify = not is_in_container() for name in ("max_user_instances", "max_user_watches"): key = f"fs.inotify.{name}" - value = host.get_fact(Sysctl)[key] + value = host.get_fact(Sysctl).get(key, 0) if value > 65534: continue if not can_modify: