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 <[email protected]> --- src/PVE/LXC.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index 89ccb54..44e20bc 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/LXC.pm @@ -2976,10 +2976,12 @@ sub vm_start { # if debug is requested, print the log it also when the start succeeded print_ct_stderr_log($vmid) if $is_debug; - + }; + my $err = $@; + eval { print_ct_warn_log($vmid); # always print warn log, if any }; - if (my $err = $@) { + if ($err) { unlink $skiplock_flag_fn; die $err; } -- 2.47.3 _______________________________________________ pve-devel mailing list [email protected] https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
