all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH installer] auto-installer: fix: add default value for partition-label
@ 2024-11-15 10:32 Christoph Heiss
  2024-11-15 14:34 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Heiss @ 2024-11-15 10:32 UTC (permalink / raw)
  To: pve-devel

This ensure backwards-compatibility of older version of
proxmox-auto-install-assistant and newer ISOs/auto-installer version.

Otherwise, it fails with a "missing key `partition_label`" error on
start.

While proxmox-auto-install-assistant writes out that field by default
now, it will be missing for ISOs prepared with older versions of that
tool.

Fix it by providing a default label, such that it always has a sensible
value.

Fixes: 2e89c07 ("auto-install-assistant: add new parameter to specify partition label")
Reported-by: Timothy Nicholson <t.nicholson@proxmox.com>
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
 proxmox-auto-installer/src/utils.rs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/proxmox-auto-installer/src/utils.rs b/proxmox-auto-installer/src/utils.rs
index 83f3f12..dd686c0 100644
--- a/proxmox-auto-installer/src/utils.rs
+++ b/proxmox-auto-installer/src/utils.rs
@@ -87,11 +87,16 @@ pub struct HttpOptions {
 #[serde(rename_all = "lowercase", deny_unknown_fields)]
 pub struct AutoInstSettings {
     pub mode: FetchAnswerFrom,
+    #[serde(default = "default_partition_label")]
     pub partition_label: String,
     #[serde(default)]
     pub http: HttpOptions,
 }
 
+fn default_partition_label() -> String {
+    "proxmox-ais".to_owned()
+}
+
 #[derive(Deserialize, Debug)]
 struct IpLinksUdevInfo {
     ifname: String,
-- 
2.47.0



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


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

* [pve-devel] applied: [PATCH installer] auto-installer: fix: add default value for partition-label
  2024-11-15 10:32 [pve-devel] [PATCH installer] auto-installer: fix: add default value for partition-label Christoph Heiss
@ 2024-11-15 14:34 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2024-11-15 14:34 UTC (permalink / raw)
  To: Proxmox VE development discussion, Christoph Heiss

Am 15.11.24 um 11:32 schrieb Christoph Heiss:
> This ensure backwards-compatibility of older version of
> proxmox-auto-install-assistant and newer ISOs/auto-installer version.
> 
> Otherwise, it fails with a "missing key `partition_label`" error on
> start.
> 
> While proxmox-auto-install-assistant writes out that field by default
> now, it will be missing for ISOs prepared with older versions of that
> tool.
> 
> Fix it by providing a default label, such that it always has a sensible
> value.
> 
> Fixes: 2e89c07 ("auto-install-assistant: add new parameter to specify partition label")
> Reported-by: Timothy Nicholson <t.nicholson@proxmox.com>
> Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
> ---
>  proxmox-auto-installer/src/utils.rs | 5 +++++
>  1 file changed, 5 insertions(+)
> 
>

applied, thanks!


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


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

end of thread, other threads:[~2024-11-15 14:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-15 10:32 [pve-devel] [PATCH installer] auto-installer: fix: add default value for partition-label Christoph Heiss
2024-11-15 14:34 ` [pve-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal