[pve-devel] [PATCH qemu-server 05/31] blockdev: add helpers for attaching and detaching block devices
Fiona Ebner
f.ebner at proxmox.com
Mon Jun 30 17:11:00 CEST 2025
Am 30.06.25 um 13:55 schrieb Fabian Grünbichler:
>> Fiona Ebner <f.ebner at proxmox.com> hat am 30.06.2025 13:45 CEST geschrieben:
>> Am 30.06.25 um 12:15 schrieb Fabian Grünbichler:
>>> On June 27, 2025 5:57 pm, Fiona Ebner wrote:
>>>> + # also remove throttle group if it was a device top node
>>>> + my $drive_id = $1;
>>>> + if (PVE::QemuServer::Drive::is_valid_drivename($drive_id)) {
>>>> + mon_cmd($vmid, 'object-del', id => "throttle-drive-$drive_id");
>>>
>>> should this get an eval?
>>
>> I think it's better to propagate the error (or do you mean having an
>> eval+die for adding context to the message)?
>
> I was thinking about a similar case like above - what if the throttle
> group object was already removed.
>
> but I guess it's more likely to hit the following sequence:
>
> 1. first detach runs into blockdev-del timeout and dies
> 2. blockdev deletion completes
> 3. second detach runs into blockdev no longer exists and returns
>
> no object-del called at all.. should we maybe make it more robust
> and handle the object already existing when attaching?
Yeah, I'll go with that in v2.
More information about the pve-devel
mailing list