[pve-devel] [PATCH storage 1/2] fix #5779: rbd: allow to pass custom krbd map options

Friedrich Weber f.weber at proxmox.com
Tue Oct 29 18:01:21 CET 2024


On 29/10/2024 14:58, Aaron Lauterer wrote:
> Does what it claims to do, setting the parameter `rxbounce` when mapping
> the RBD disk.
> 
> Therefore:
> 
> Tested-By: Aaron Lauterer <a.lauterer at proxmox.com>

Thanks for testing!

>> diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
>> index 8cc693c..02be257 100644
>> --- a/src/PVE/Storage/Plugin.pm
>> +++ b/src/PVE/Storage/Plugin.pm
>> @@ -394,6 +394,16 @@ sub verify_dir_override {
>>       die "invalid override '$value'\n";
>>   }
>>   +PVE::JSONSchema::register_format('pve-storage-krbd-map-option',
>> \&verify_krbd_map_option);
>> +sub verify_krbd_map_option {
>> +    my ($option, $noerr) = @_;
>> +
>> +    return $option if $option eq 'rxbounce';
>> +
>> +    return undef if $noerr;
>> +    die "invalid krbd map option '$option'\n";
>> +}
>> +
> 
> Why do you place this RBD specific option in the general `Plugin.pm` and
> not into the `RBDPlugin.pm`?
> 
> A quick test of mine where I places this in the `RBDPlugin.pm` before
> the properties sub seemed to have worked fine.
> 

Yeah, good question. I placed it there mostly because the other format
definitions are also there :) But I see the point that it could also be
moved to RBDPlugin.pm (as according to your test this appears to work too).




More information about the pve-devel mailing list