From 92d2ffdd9bd508e2188257e0a1bab9fe95cd9b23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Tue, 18 Feb 2025 13:58:12 +0100 Subject: [PATCH] config: make attempts at writing out NoWrite configs fatal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit attempting to write such a config is already a bug, and execution should not continue in this case. very often a write of the config will be followed by reloading it, expecting changes to be persisted and possibly missing re-checking of the original reason for marking the config as NoWrite. Signed-off-by: Fabian Grünbichler Reviewed-by: Fiona Ebner --- PVE/QemuConfig/NoWrite.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/PVE/QemuConfig/NoWrite.pm b/PVE/QemuConfig/NoWrite.pm index 02e5f158..53a34990 100644 --- a/PVE/QemuConfig/NoWrite.pm +++ b/PVE/QemuConfig/NoWrite.pm @@ -16,8 +16,7 @@ sub mark_config { sub write_config { my ($class, $vmid, $conf) = @_; - log_warn("refusing to write temporary configuration"); - return; + die("refusing to write temporary configuration\n"); } 1;