[pve-devel] [PATCH qemu-server 2/2] config: make attempts at writing out NoWrite configs fatal
Fabian Grünbichler
f.gruenbichler at proxmox.com
Tue Feb 18 14:08:12 CET 2025
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 <f.gruenbichler at proxmox.com>
---
this might be a bit opinionated, but I'd rather err on the side of
caution/aborting here..
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;
--
2.39.5
More information about the pve-devel
mailing list