[pve-devel] [PATCH v5 pve-container 1/5] Ensure that container startup warnings are displayed if startup fails.
Robert Obkircher
r.obkircher at proxmox.com
Mon Nov 17 12:51:29 CET 2025
During container startup, warnings are written to a file, which is
later logged to the RESTEnvironment. This should also happen in the
presence of errors, so move it outside the eval block.
Signed-off-by: Robert Obkircher <r.obkircher at proxmox.com>
---
src/PVE/LXC.pm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index e6b0f50..dd16215 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -3169,10 +3169,10 @@ sub vm_start {
# if debug is requested, print the log it also when the start succeeded
print_ct_stderr_log($vmid) if $is_debug;
-
- print_ct_warn_log($vmid); # always print warn log, if any
};
- if (my $err = $@) {
+ my $err = $@;
+ print_ct_warn_log($vmid); # always print warn log, if any
+ if ($err) {
unlink $skiplock_flag_fn;
die $err;
}
--
2.47.3
More information about the pve-devel
mailing list