From: Thomas Ellmenreich <t.ellmenreich@proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: Thomas Ellmenreich <t.ellmenreich@proxmox.com>
Subject: [PATCH container 0/2] mountpoint: allow certain options to be hotplugged
Date: Wed, 4 Nov 2026 10:29:37 +0100 [thread overview]
Message-ID: <20261104092939.123574-1-t.ellmenreich@proxmox.com> (raw)
Ticking the backup or replicate flag on a container mountpoint and the
replicate flag on the containers rootfs can be applied directly even if
the container is running. This should be possible because it does not
affect the actual mountpoint/disk.
This functionality is already present for VMs, but not for containers.
With this implementation a list of "fast pluggable" options is created,
and any change that only affects any of these options will be fast plugged.
Should a "fast pluggable" option change be accompanied by a
non-"fast pluggable" option change, then the whole change will be set as
pending so that it may be applied as a single unit.
Testing
-------
- Only changing the `backup`/`replicate` setting does precisely that,
skipping the pending state.
- When combining `backup`/`replicate` with changing a different setting,
they are both marked as pending.
Questions
---------
- I have rewritten the check for the fast pluggable option to use
`print_volume` since that makes it a lot easier. `print_volume` calls
`print_property_string` which has a 'skip' parameter that can only
be used if I also change `print_ct_mountpoint`. For this reason I
decided to not make the change and delete the keys instead. That said
using this skip parameter is an option.
- The tests for the __mountpoint_config_fast_plug_safe can now be found
in the src/test/ folder. I'm not sure if that is the correct spot or
if I should have created a src/PVE/LXC/test subdirectory and placed the
tests in there.
- I have added the option to also fast plug the rootfs options, as replicate
applies there as well, although I am somewhat unsure if that is a good
idea. Because of that I have placed it in a separate commit so that it may
be skipped or reverted in the future.
Changelog
---------
RFC -> v1 (thanks @Wolfgang, @Filip)
* Instead of comparing the configs key by key, I now delete the
fast pluggable options, convert the config to a string with
print_volume and then compare those strings.
* Added replicate to the fast plug options.
* Moved the list of fast pluggable keys out of the
__mountpoint_config_fast_plug_safe subroutine.
* The __mountpoint_config_fast_plug_safe helper, it not private
anymore so that it may be called in tests, but it has gained
the __ prefix, indicating that it should not be used.
* Added tests for the __mountpoint_config_fast_plug_safe subroutine.
* Removed an early return that has become unreachable due to the changes.
* Added the option to also fast plug the rootfs disk.
pve-container:
Thomas Ellmenreich (2):
mountpoint: allow changing mountpoint properties at runtime
mountpoint: allow changing rootfs properties at runtime
src/PVE/LXC/Config.pm | 39 ++++++++++--
src/test/Makefile | 6 +-
src/test/config_tests.pl | 131 +++++++++++++++++++++++++++++++++++++++
3 files changed, 169 insertions(+), 7 deletions(-)
create mode 100755 src/test/config_tests.pl
Summary over all repositories:
3 files changed, 169 insertions(+), 7 deletions(-)
--
Generated by murpp 0.12.0
next reply other threads:[~2026-11-04 9:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 9:29 Thomas Ellmenreich [this message]
2026-11-04 9:29 ` [PATCH pve-container 1/2] mountpoint: allow changing mountpoint properties at runtime Thomas Ellmenreich
2026-11-04 9:29 ` [PATCH pve-container 2/2] mountpoint: allow changing rootfs " Thomas Ellmenreich
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=20261104092939.123574-1-t.ellmenreich@proxmox.com \
--to=t.ellmenreich@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