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.nichol...@proxmox.com> Signed-off-by: Christoph Heiss <c.he...@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