From: "Daniel Kral" <d.kral@proxmox.com>
To: "Maximiliano Sandoval" <m.sandoval@proxmox.com>,
"Filip Schauer" <f.schauer@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [PATCH container 7/8] implement per-mountpoint uid/gid mapping
Date: Fri, 27 Feb 2026 16:01:52 +0100 [thread overview]
Message-ID: <DGPU2HVHECAM.2MJRHDOH4NIEH@proxmox.com> (raw)
In-Reply-To: <s8oldgeckt3.fsf@toolbox>
On Fri Feb 27, 2026 at 3:39 PM CET, Maximiliano Sandoval wrote:
> Filip Schauer <f.schauer@proxmox.com> writes:
>> diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
>> index 5442586..9f56bc7 100644
>> --- a/src/PVE/LXC/Config.pm
>> +++ b/src/PVE/LXC/Config.pm
>> @@ -369,6 +369,13 @@ my $rootfs_desc = {
>> format_description => 'opt[;opt...]',
>> pattern => qr/$valid_mount_option_re(;$valid_mount_option_re)*/,
>> },
>> + idmap => {
>> + optional => 1,
>> + type => 'string',
>> + description => 'Map specific UIDs/GIDs to specific host
>> UIDs/GIDs for this mount point',
>
>
> I think this would benefit from a verbose_description, it is not clear
> to me whether the syntax 123:456:1 maps 123 from the root to 456 on the
> container or the other way around. Perhaps an explicit example would be
> helpful.
+1, especially that each field's purpose is clarified once more there as
the user/group id mappings can be confusing at first for users.
>
>> + format_description => 'id-type:id-mount:id-host:id-range id-type:id-mount:...',
nit: id-range-size might be a bit clearer that it specifies a single
integer, which is the size of the id map range.
I guess the string could also be abbreviated to
<type>:<mount>:<host>:<range-size> if it's clear to the user that all of
these refer to the user/group ids for a idmap.
Might also make sense to make it more apparent that that string can be
repeated:
format_description => '<type>:<mount>:<host>:<range-size>{ <type>:<mount>:<host>:<range-size>}*',
On another note, do we have other properties where we use space as a
separator? It makes sense here as it's used like that in the underlying
API but might make our API inconsistent, but might be a bit pedantic
from my side.
>> + pattern => qr/^(?:[ug]:[0-9]+:[0-9]+:[1-9][0-9]*)(?: [ug]:[0-9]+:[0-9]+:[1-9][0-9]*)*$/,
>> + },
>> ro => {
>> type => 'boolean',
>> description => 'Read-only mount point',
next prev parent reply other threads:[~2026-02-27 15:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 13:04 [PATCH common/container/manager 0/8] " Filip Schauer
2026-02-23 13:04 ` [PATCH common 1/8] tools: export O_CLOEXEC constant Filip Schauer
2026-02-23 13:04 ` [PATCH common 2/8] syscall: add missing mount attribute constants Filip Schauer
2026-02-23 13:04 ` [PATCH common 3/8] tools: add mount_setattr syscall Filip Schauer
2026-02-23 13:04 ` [PATCH container 4/8] namespaces: relax prototype of run_in_userns Filip Schauer
2026-02-23 13:04 ` [PATCH container 5/8] namespaces: refactor run_in_userns Filip Schauer
2026-02-23 13:04 ` [PATCH container 6/8] namespaces: add helper to create user namespace from idmap Filip Schauer
2026-02-23 13:04 ` [PATCH container 7/8] implement per-mountpoint uid/gid mapping Filip Schauer
2026-02-27 14:39 ` Maximiliano Sandoval
2026-02-27 15:01 ` Daniel Kral [this message]
2026-02-27 15:34 ` Wolfgang Bumiller
2026-03-02 16:37 ` Filip Schauer
2026-03-02 18:05 ` Filip Schauer
2026-03-03 11:52 ` Wolfgang Bumiller
2026-03-03 13:59 ` Filip Schauer
2026-03-03 16:16 ` Wolfgang Bumiller
2026-02-23 13:04 ` [PATCH manager 8/8] ui: lxc/MPEdit: add "idmap" option Filip Schauer
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=DGPU2HVHECAM.2MJRHDOH4NIEH@proxmox.com \
--to=d.kral@proxmox.com \
--cc=f.schauer@proxmox.com \
--cc=m.sandoval@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