From ec11b92abb5e5610ce64934e0876f1b54d375cab Mon Sep 17 00:00:00 2001 From: Fiona Ebner Date: Wed, 21 Jun 2023 12:04:32 +0200 Subject: [PATCH] cloudinit: restore previous default for package upgrades Commit efa3355d ("fix #3428: cloudinit: add parameter for upgrade on boot") changed the default, but this is a breaking change. The bug report was only about making the option configurable. The commit doesn't give an explicit reason for why, and arguably, doing the upgrade is not an issue for most users. It also leads to a different cloud-init instance ID, because of the different setting, which in turn leads to ssh host key regeneration within the VM. Reported-by: Friedrich Weber Signed-off-by: Fiona Ebner --- PVE/QemuServer.pm | 2 +- PVE/QemuServer/Cloudinit.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index e82a59a2..a79655dd 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -786,7 +786,7 @@ my $confdesc_cloudinit = { optional => 1, type => 'boolean', description => 'cloud-init: do an automatic package upgrade after the first boot.', - default => 0, + default => 1, }, cicustom => { optional => 1, diff --git a/PVE/QemuServer/Cloudinit.pm b/PVE/QemuServer/Cloudinit.pm index cd5cc242..7449993a 100644 --- a/PVE/QemuServer/Cloudinit.pm +++ b/PVE/QemuServer/Cloudinit.pm @@ -148,7 +148,7 @@ sub cloudinit_userdata { $content .= " - default\n"; } - $content .= "package_upgrade: true\n" if $conf->{ciupgrade}; + $content .= "package_upgrade: true\n" if !defined($conf->{ciupgrade}) || $conf->{ciupgrade}; return $content; }