From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 4502B99F6D for ; Thu, 4 May 2023 12:55:41 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 25F571D0AE for ; Thu, 4 May 2023 12:55:11 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Thu, 4 May 2023 12:55:09 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 4DFCB473D0 for ; Thu, 4 May 2023 12:55:09 +0200 (CEST) From: Leo Nunner To: pve-devel@lists.proxmox.com Date: Thu, 4 May 2023 12:55:01 +0200 Message-Id: <20230504105502.108104-2-l.nunner@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230504105502.108104-1-l.nunner@proxmox.com> References: <20230504105502.108104-1-l.nunner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.134 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 T_SCC_BODY_TEXT_LINE -0.01 - URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [cloudinit.pm, qemuserver.pm, proxmox.com] Subject: [pve-devel] [PATCH qemu-server] fix #3428: cloudinit: add parameter for upgrade on boot 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: , X-List-Received-Date: Thu, 04 May 2023 10:55:41 -0000 up until now, we did an automatic upgrade after the first boot in our standard cloud-init config. This has been requested to be toggleable several times [1][2]. With this patch, "package_upgrade" is disabled by default, and needs to be enabled manually, diverging from the previous behaviour. [1] https://forum.proxmox.com/threads/how-to-prevent-automatic-apt-upgrade-during-the-first-boot-with-cloud-init.68472/ [2] https://forum.proxmox.com/threads/cloud-init-ohne-package-upgrade.123841/ Signed-off-by: Leo Nunner --- PVE/QemuServer.pm | 5 +++++ PVE/QemuServer/Cloudinit.pm | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index c1d0fd2..3317fc4 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -780,6 +780,11 @@ my $confdesc_cloudinit = { .' recommended. Use ssh keys instead. Also note that older cloud-init versions do not' .' support hashed passwords.', }, + ciupgrade => { + optional => 1, + type => 'boolean', + description => 'cloud-init: do an automatic package upgrade after the first boot.' + }, cicustom => { optional => 1, type => 'string', diff --git a/PVE/QemuServer/Cloudinit.pm b/PVE/QemuServer/Cloudinit.pm index a0c3d60..10962b5 100644 --- a/PVE/QemuServer/Cloudinit.pm +++ b/PVE/QemuServer/Cloudinit.pm @@ -146,7 +146,7 @@ sub cloudinit_userdata { $content .= " - default\n"; } - $content .= "package_upgrade: true\n"; + $content .= "package_upgrade: true\n" if $conf->{ciupgrade}; return $content; } -- 2.30.2