From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 6C4181FF0C0 for ; Wed, 04 Nov 2026 10:30:00 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 43D172130A; Wed, 04 Nov 2026 10:29:57 +0100 (CET) From: Thomas Ellmenreich To: pve-devel@lists.proxmox.com Subject: [PATCH container 0/2] mountpoint: allow certain options to be hotplugged Date: Wed, 4 Nov 2026 10:29:37 +0100 Message-ID: <20261104092939.123574-1-t.ellmenreich@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793784591533 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.363 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: DFE7VNG4JGJPVPGXOLAET7EO3W2DEIFC X-Message-ID-Hash: DFE7VNG4JGJPVPGXOLAET7EO3W2DEIFC X-MailFrom: t.ellmenreich@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Thomas Ellmenreich X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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