From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 7345C1FF17E for ; Thu, 13 Nov 2025 17:14:13 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0376522223; Thu, 13 Nov 2025 17:15:07 +0100 (CET) Message-ID: <658ae25d-f3f9-4dbf-abc7-8d897b408f16@proxmox.com> Date: Thu, 13 Nov 2025 17:14:32 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Proxmox VE development discussion , Robert Obkircher References: <20251113150342.101933-1-r.obkircher@proxmox.com> <20251113150342.101933-2-r.obkircher@proxmox.com> Content-Language: en-US From: Fiona Ebner In-Reply-To: <20251113150342.101933-2-r.obkircher@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1763050446617 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.019 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH v4 pve-container 1/5] Ensure that container startup warnings are displayed if startup fails. X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Am 13.11.25 um 4:04 PM schrieb Robert Obkircher: > 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 > --- > 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; Should the same be done for the error log here? > - > + }; > + my $err = $@; > + eval { > print_ct_warn_log($vmid); # always print warn log, if any > }; Nit: looking at the implementation of print_ct_warn_log(), it already seems like it's written to avoid die-ing, so we could avoid the eval here. Otherwise, I'd add a comment stating that the error from this eval is ignored on purpose, but again, I don't think we need the eval here. > - if (my $err = $@) { > + if ($err) { > unlink $skiplock_flag_fn; > die $err; > } _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel