From 7d72b0e592452aa54117b5263be0aa01845e2622 Mon Sep 17 00:00:00 2001 From: ccclxxiii <151577046+ccclxxiii@users.noreply.github.com> Date: Fri, 30 Jan 2026 21:10:19 +0000 Subject: [PATCH 1/2] fix:[wip] fix concact issue which causes dns failure --- cmdeploy/src/cmdeploy/deployers.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cmdeploy/src/cmdeploy/deployers.py b/cmdeploy/src/cmdeploy/deployers.py index 95f366a9..13277ff7 100644 --- a/cmdeploy/src/cmdeploy/deployers.py +++ b/cmdeploy/src/cmdeploy/deployers.py @@ -550,6 +550,18 @@ def deploy_chatmail(config_path: Path, disable_mail: bool, website_only: bool) - return if host.get_fact(Port, port=53) != "unbound": + server.shell( + name="Ensure resolv.conf ends with newline", + commands=[ + "python3 - <<'PY'\n" + "from pathlib import Path\n" + "path = Path('/etc/resolv.conf')\n" + "data = path.read_bytes() if path.exists() else b''\n" + "if data and not data.endswith(b'\\n'):\n" + " path.write_bytes(data + b'\\n')\n" + "PY" + ], + ) files.line( name="Add 9.9.9.9 to resolv.conf", path="/etc/resolv.conf", From c0718325ef911b9d04c19ed470b4a8e47b46c52e Mon Sep 17 00:00:00 2001 From: ccclxxiii <151577046+ccclxxiii@users.noreply.github.com> Date: Fri, 30 Jan 2026 22:17:53 +0000 Subject: [PATCH 2/2] fix: simplify resolver fix --- cmdeploy/src/cmdeploy/deployers.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/cmdeploy/src/cmdeploy/deployers.py b/cmdeploy/src/cmdeploy/deployers.py index 13277ff7..74e077d9 100644 --- a/cmdeploy/src/cmdeploy/deployers.py +++ b/cmdeploy/src/cmdeploy/deployers.py @@ -550,22 +550,11 @@ def deploy_chatmail(config_path: Path, disable_mail: bool, website_only: bool) - return if host.get_fact(Port, port=53) != "unbound": - server.shell( - name="Ensure resolv.conf ends with newline", - commands=[ - "python3 - <<'PY'\n" - "from pathlib import Path\n" - "path = Path('/etc/resolv.conf')\n" - "data = path.read_bytes() if path.exists() else b''\n" - "if data and not data.endswith(b'\\n'):\n" - " path.write_bytes(data + b'\\n')\n" - "PY" - ], - ) files.line( name="Add 9.9.9.9 to resolv.conf", path="/etc/resolv.conf", - line="nameserver 9.9.9.9", + # Guard against resolv.conf missing a trailing newline (SolusVM bug). + line="\nnameserver 9.9.9.9", ) port_services = [