From: Christoph Heiss <c.heiss@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH installer] common: fix deserialization of install config
Date: Tue, 19 Nov 2024 12:08:44 +0100 [thread overview]
Message-ID: <20241119111003.223961-1-c.heiss@proxmox.com> (raw)
We serialize it as an integer for perl compatibility, so we need to also
deserialize it as such .. the latter is used in proxmox-chroot.
Otherwise, an auto-installation will fail at the end, when a
post-installation webhook is configured, while trying to run the
proxmox-chroot tool.
Reported-by: Timothy Nicholson <t.nicholson@proxmox.com>
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
proxmox-installer-common/src/setup.rs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/proxmox-installer-common/src/setup.rs b/proxmox-installer-common/src/setup.rs
index fefedf6..1a9a71c 100644
--- a/proxmox-installer-common/src/setup.rs
+++ b/proxmox-installer-common/src/setup.rs
@@ -473,7 +473,10 @@ pub struct InstallRootPassword {
#[derive(Clone, Default, Deserialize, Serialize)]
pub struct InstallFirstBootSetup {
- #[serde(serialize_with = "serialize_bool_as_u32")]
+ #[serde(
+ serialize_with = "serialize_bool_as_u32",
+ deserialize_with = "deserialize_bool_from_int"
+ )]
pub enabled: bool,
#[serde(skip_serializing_if = "Option::is_none")]
pub ordering_target: Option<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-19 11:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-19 11:08 Christoph Heiss [this message]
2024-11-19 13:31 ` [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=20241119111003.223961-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox