On 19/01/2024 12:31, Fiona Ebner wrote:
> Am 19.01.24 um 11:59 schrieb Fiona Ebner:
>> Am 18.01.24 um 12:11 schrieb Friedrich Weber:
>>> diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm
>>> index 4b951e7..5377823 100644
>>> --- a/src/PVE/Storage/LVMPlugin.pm
>>> +++ b/src/PVE/Storage/LVMPlugin.pm
>>> @@ -130,6 +130,11 @@ sub lvm_vgs {
>>>  
>>>         my ($name, $size, $free, $lvcount, $pvname, $pvsize, $pvfree) = 
>>> split (':', $line);
>>>  
>>> +       if (!defined($size) || !defined($free) || !defined($lvcount)) {
>>> +           warn "unexpected output from vgs: $line\n";
>>> +           return;
>>> +       }
>>> +
>>
>> Nit: maybe quote 'vgs' and/or say "command 'vgs'"?

Sounds good!

>> Please use log_warn() from PVE::RESTEnvironment for new warnings, so
>> they also show up in task logs.
> 
> Sorry, I mean "show up more visibly", because they count towards the
> warning count shown in the task result.

Thanks, wasn't aware of this benefit of `log_warn`.

Will send a v3 with the two changes.


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to