From: Alexandre Derumier <aderumier@odiso.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v3 qemu-server 0/7] cloudinit pending behaviour change
Date: Wed, 9 Jun 2021 13:54:10 +0200 [thread overview]
Message-ID: <20210609115417.3326775-1-aderumier@odiso.com> (raw)
Hi,
This is an attempt to cleanup current behaviour of cloudinit online changes.
Currently, we setup cloudinit options as pending, until we generate the config drive.
This is not 100% true, because some option like vm name, nic mac address can be changed,
without going to pending, so user can't known if it need to regenerated it.
Also custom config can be done with snippets file, without any pending state.
Also, some can are very difficult to handle, if you hotplug a nic but it's failing,so pending,
then you defined an ipconfig, and then you revert hotplug.
(This will be really usefull with ipam implementation, where ipconfig pending state is really
needed, as we need to follow the pending state of the netX interface)
So, instead of setting cloudinit values in pending,
this patch serie extract the current config from the cloudinit drive and compare it to vm config (pending config).
(Currently the vm config is simply copied inside the iso at generation, but we could implemented
configdrive format parsers)
A new specific cloudinit config api is added too, merging ipaddrX && netX mac
in same field, and displaying the diff between current and generated config.
(we could implemented read config from custom snippet too later)
Changelog V1:
- use [special:cloudinit] instead [CLOUDINIT] for section
- delete config section on drive removal
- config api: move code to new PVE::QemuServer::Cloudinit::get_pending_config
- config api: add "qm cloudinit pending" cli
- add update api to regenerate drive with 1 api call
- add cloudinit hotplug option
Changelog v2:
- fix trailing whitespace in first patch
- revert previous "cloudinit" check in snapshot name (":" character is already forbidden)
Changelog v3:
- extract the current conf from cloudinit drive instead write the special cloudinit section
Alexandre Derumier (7):
cloudinit: add vm config to cloudinit drive
cloudinit: generate cloudinit drive on offline plug
cloudinit: make cloudnit options fastplug
api2: add cloudinit config api
cloudinit : add extract_cloudinit_config
api2: add cloudinit_update
add cloudinit hotplug
PVE/API2/Qemu.pm | 118 ++++++++++++++++++++++++++++++++++
PVE/CLI/qm.pm | 2 +
PVE/QemuServer.pm | 81 ++++++++++++++---------
PVE/QemuServer/Cloudinit.pm | 125 ++++++++++++++++++++++++++++++++++++
4 files changed, 296 insertions(+), 30 deletions(-)
--
2.20.1
next reply other threads:[~2021-06-09 11:54 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-09 11:54 Alexandre Derumier [this message]
2021-06-09 11:54 ` [pve-devel] [PATCH v3 qemu-server 1/7] cloudinit: add vm config to cloudinit drive Alexandre Derumier
2022-03-31 13:01 ` Fabian Ebner
2021-06-09 11:54 ` [pve-devel] [PATCH v3 qemu-server 2/7] cloudinit: generate cloudinit drive on offline plug Alexandre Derumier
2022-03-31 13:01 ` Fabian Ebner
2021-06-09 11:54 ` [pve-devel] [PATCH v3 qemu-server 3/7] cloudinit: make cloudnit options fastplug Alexandre Derumier
2022-03-31 13:01 ` Fabian Ebner
2021-06-09 11:54 ` [pve-devel] [PATCH v3 qemu-server 4/7] api2: add cloudinit config api Alexandre Derumier
2022-03-31 13:01 ` Fabian Ebner
2022-04-27 14:14 ` DERUMIER, Alexandre
2021-06-09 11:54 ` [pve-devel] [PATCH v3 qemu-server 5/7] cloudinit : add extract_cloudinit_config Alexandre Derumier
2022-03-31 13:01 ` Fabian Ebner
2021-06-09 11:54 ` [pve-devel] [PATCH v3 qemu-server 6/7] api2: add cloudinit_update Alexandre Derumier
2022-03-31 13:01 ` Fabian Ebner
2021-06-09 11:54 ` [pve-devel] [PATCH v3 qemu-server 7/7] add cloudinit hotplug Alexandre Derumier
2022-03-31 13:01 ` [pve-devel] [PATCH v3 qemu-server 0/7] cloudinit pending behaviour change Fabian Ebner
2022-03-31 13:11 ` DERUMIER, Alexandre
2022-04-20 16:22 ` DERUMIER, Alexandre
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=20210609115417.3326775-1-aderumier@odiso.com \
--to=aderumier@odiso.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