On Fri Feb 27, 2026 at 3:39 PM CET, Maximiliano Sandoval wrote:
> Filip Schauer <[email protected]> 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',



Reply via email to