]> git.proxmox.com Git - qemu-server.git/commitdiff
cloudinit: restore previous default for package upgrades
authorFiona Ebner <f.ebner@proxmox.com>
Wed, 21 Jun 2023 10:04:32 +0000 (12:04 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 21 Jun 2023 10:40:58 +0000 (12:40 +0200)
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 <f.weber@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
PVE/QemuServer.pm
PVE/QemuServer/Cloudinit.pm

index e82a59a2e3581b47899f7d82af9d846a8f5b501e..a79655ddbd159954dc5c66a1040e161c19cb3fa1 100644 (file)
@@ -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,
index cd5cc242db64e3bfa23fdf379b413b47077bd8dd..7449993ab82e1c37bec7b3b94f12b1eb91e98b31 100644 (file)
@@ -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;
 }