From: Christoph Heiss <c.heiss@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH installer] auto-installer: fix: add default value for partition-label
Date: Fri, 15 Nov 2024 11:32:34 +0100 [thread overview]
Message-ID: <20241115103248.205313-1-c.heiss@proxmox.com> (raw)
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
next reply other threads:[~2024-11-15 10:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-15 10:32 Christoph Heiss [this message]
2024-11-15 14:34 ` [pve-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241115103248.205313-1-c.heiss@proxmox.com \
--to=c.heiss@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.