public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH-SERIES qemu-server/manager] restore PVE 7 default for cloudinit package upgrades
@ 2023-06-21 10:04 Fiona Ebner
  2023-06-21 10:04 ` [pve-devel] [PATCH qemu-server 1/2] schema: cloudinit: document default for ciupgrade Fiona Ebner
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Fiona Ebner @ 2023-06-21 10:04 UTC (permalink / raw)
  To: pve-devel

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.

Dependency bump manager -> qemu-server doesn't hurt to keep things
aligned (at least in one direction).

Thanks to Friedrich for catching the issue!


qemu-server:

Fiona Ebner (2):
  schema: cloudinit: document default for ciupgrade
  cloudinit: restore previous default for package upgrades

 PVE/QemuServer.pm           | 3 ++-
 PVE/QemuServer/Cloudinit.pm | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)


manager:

Fiona Ebner (1):
  ui: cloudinit: align default value for package upgrades with backend
    again

 www/manager6/qemu/CloudInit.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.39.2





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pve-devel] [PATCH qemu-server 1/2] schema: cloudinit: document default for ciupgrade
  2023-06-21 10:04 [pve-devel] [PATCH-SERIES qemu-server/manager] restore PVE 7 default for cloudinit package upgrades Fiona Ebner
@ 2023-06-21 10:04 ` Fiona Ebner
  2023-06-21 10:04 ` [pve-devel] [PATCH qemu-server 2/2] cloudinit: restore previous default for package upgrades Fiona Ebner
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Fiona Ebner @ 2023-06-21 10:04 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 PVE/QemuServer.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 0fa43a74..91aab21c 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -785,7 +785,8 @@ my $confdesc_cloudinit = {
     ciupgrade => {
 	optional => 1,
 	type => 'boolean',
-	description => 'cloud-init: do an automatic package upgrade after the first boot.'
+	description => 'cloud-init: do an automatic package upgrade after the first boot.',
+	default => 0,
     },
     cicustom => {
 	optional => 1,
-- 
2.39.2





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pve-devel] [PATCH qemu-server 2/2] cloudinit: restore previous default for package upgrades
  2023-06-21 10:04 [pve-devel] [PATCH-SERIES qemu-server/manager] restore PVE 7 default for cloudinit package upgrades Fiona Ebner
  2023-06-21 10:04 ` [pve-devel] [PATCH qemu-server 1/2] schema: cloudinit: document default for ciupgrade Fiona Ebner
@ 2023-06-21 10:04 ` Fiona Ebner
  2023-06-21 10:04 ` [pve-devel] [PATCH manager 1/1] ui: cloudinit: align default value for package upgrades with backend again Fiona Ebner
  2023-06-21 10:47 ` [pve-devel] applied-series: [PATCH-SERIES qemu-server/manager] restore PVE 7 default for cloudinit package upgrades Thomas Lamprecht
  3 siblings, 0 replies; 5+ messages in thread
From: Fiona Ebner @ 2023-06-21 10:04 UTC (permalink / raw)
  To: pve-devel

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           | 2 +-
 PVE/QemuServer/Cloudinit.pm | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 91aab21c..c9c1936a 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;
 }
-- 
2.39.2





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pve-devel] [PATCH manager 1/1] ui: cloudinit: align default value for package upgrades with backend again
  2023-06-21 10:04 [pve-devel] [PATCH-SERIES qemu-server/manager] restore PVE 7 default for cloudinit package upgrades Fiona Ebner
  2023-06-21 10:04 ` [pve-devel] [PATCH qemu-server 1/2] schema: cloudinit: document default for ciupgrade Fiona Ebner
  2023-06-21 10:04 ` [pve-devel] [PATCH qemu-server 2/2] cloudinit: restore previous default for package upgrades Fiona Ebner
@ 2023-06-21 10:04 ` Fiona Ebner
  2023-06-21 10:47 ` [pve-devel] applied-series: [PATCH-SERIES qemu-server/manager] restore PVE 7 default for cloudinit package upgrades Thomas Lamprecht
  3 siblings, 0 replies; 5+ messages in thread
From: Fiona Ebner @ 2023-06-21 10:04 UTC (permalink / raw)
  To: pve-devel

The default in Proxmox VE 7 was true and it was decided to keep that
and avoid a breaking change.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 www/manager6/qemu/CloudInit.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/manager6/qemu/CloudInit.js b/www/manager6/qemu/CloudInit.js
index 0e06d962..03d06d9c 100644
--- a/www/manager6/qemu/CloudInit.js
+++ b/www/manager6/qemu/CloudInit.js
@@ -290,7 +290,7 @@ Ext.define('PVE.qemu.CloudInit', {
 		header: gettext('Upgrade packages'),
 		iconCls: 'fa fa-archive',
 		renderer: Proxmox.Utils.format_boolean,
-		defaultValue: '',
+		defaultValue: 1,
 		editor: {
 		    xtype: 'proxmoxWindowEdit',
 		    subject: gettext('Upgrade packages on boot'),
@@ -298,7 +298,7 @@ Ext.define('PVE.qemu.CloudInit', {
 			xtype: 'proxmoxcheckbox',
 			name: 'ciupgrade',
 			uncheckedValue: 0,
-			defaultValue: 0,
+			value: 1, // serves as default value, using defaultValue is not enough
 			fieldLabel: gettext('Upgrade packages'),
 			labelWidth: 140,
 		    },
-- 
2.39.2





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pve-devel] applied-series: [PATCH-SERIES qemu-server/manager] restore PVE 7 default for cloudinit package upgrades
  2023-06-21 10:04 [pve-devel] [PATCH-SERIES qemu-server/manager] restore PVE 7 default for cloudinit package upgrades Fiona Ebner
                   ` (2 preceding siblings ...)
  2023-06-21 10:04 ` [pve-devel] [PATCH manager 1/1] ui: cloudinit: align default value for package upgrades with backend again Fiona Ebner
@ 2023-06-21 10:47 ` Thomas Lamprecht
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas Lamprecht @ 2023-06-21 10:47 UTC (permalink / raw)
  To: Proxmox VE development discussion, Fiona Ebner

Am 21/06/2023 um 12:04 schrieb Fiona Ebner:
> 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.
> 
> Dependency bump manager -> qemu-server doesn't hurt to keep things
> aligned (at least in one direction).
> 
> Thanks to Friedrich for catching the issue!
> 
> 
> qemu-server:
> 
> Fiona Ebner (2):
>   schema: cloudinit: document default for ciupgrade
>   cloudinit: restore previous default for package upgrades
> 
>  PVE/QemuServer.pm           | 3 ++-
>  PVE/QemuServer/Cloudinit.pm | 2 +-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> 
> manager:
> 
> Fiona Ebner (1):
>   ui: cloudinit: align default value for package upgrades with backend
>     again
> 
>  www/manager6/qemu/CloudInit.js | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 


applied series, thanks!




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-06-21 10:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-21 10:04 [pve-devel] [PATCH-SERIES qemu-server/manager] restore PVE 7 default for cloudinit package upgrades Fiona Ebner
2023-06-21 10:04 ` [pve-devel] [PATCH qemu-server 1/2] schema: cloudinit: document default for ciupgrade Fiona Ebner
2023-06-21 10:04 ` [pve-devel] [PATCH qemu-server 2/2] cloudinit: restore previous default for package upgrades Fiona Ebner
2023-06-21 10:04 ` [pve-devel] [PATCH manager 1/1] ui: cloudinit: align default value for package upgrades with backend again Fiona Ebner
2023-06-21 10:47 ` [pve-devel] applied-series: [PATCH-SERIES qemu-server/manager] restore PVE 7 default for cloudinit package upgrades Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal