From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 1015D1FF17E for ; Thu, 27 Nov 2025 10:26:43 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 14B2D1E0D8; Thu, 27 Nov 2025 10:26:55 +0100 (CET) From: Friedrich Weber To: pve-devel@lists.proxmox.com Date: Thu, 27 Nov 2025 10:26:01 +0100 Message-ID: <20251127092617.60723-1-f.weber@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1764235543997 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.013 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 SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH manager] pveupdate: do not try to update subscription when using offline key 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" pveupdate is run daily by pve-daily-update.service and, among other things, it tries to update the subscription. Updating a subscription fails early when an offline key is installed, hence, pveupdate will currently log the following to the syslog with severity level "error": > update subscription info failed: Updating offline key not possible - > please remove and re-add subscription key to switch to online key. This may be confusing to users, because it sounds like an action is needed on their part to resolve an error. To avoid that, skip the subscription update if an offline key is installed. Reported in enterprise support. Signed-off-by: Friedrich Weber --- Notes: This will result in pveupdate calling read_etc_subscription three times in the non-offline key case, which is certainly not optimal, but considering this is done once a day, maybe not that bad either, so I opted for this simple patch for now. bin/pveupdate | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/pveupdate b/bin/pveupdate index c5356c88..50ca60a1 100755 --- a/bin/pveupdate +++ b/bin/pveupdate @@ -39,7 +39,13 @@ $rpcenv->set_user('root@pam'); my $nodename = PVE::INotify::nodename(); -eval { PVE::API2::Subscription->update({ node => $nodename }); }; +eval { + my $subscription_info = PVE::API2::Subscription::read_etc_subscription(); + return if !$subscription_info; + # no need to update offline subscription keys + return if $subscription_info->{signature}; + PVE::API2::Subscription->update({ node => $nodename }); +}; if (my $err = $@) { syslog('err', "update subscription info failed: $err"); } -- 2.47.3 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel