all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH container 0/2] mountpoint: allow certain options to be hotplugged
@ 2026-11-04  9:29 Thomas Ellmenreich
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Ellmenreich @ 2026-11-04  9:29 UTC (permalink / raw)
  To: pve-devel; +Cc: Thomas Ellmenreich

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




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-04  9:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-04  9:29 [PATCH container 0/2] mountpoint: allow certain options to be hotplugged Thomas Ellmenreich
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

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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal