public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH-SERIES qemu-server v2 0/3] fix #7743: api: disk import: avoid locking twice when importing from OVA or same VM
@ 2026-07-03 11:54 Fiona Ebner
  2026-07-03 11:54 ` [PATCH qemu-server v2 1/3] api: disk import: remove unused wrongly named variable Fiona Ebner
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Fiona Ebner @ 2026-07-03 11:54 UTC (permalink / raw)
  To: pve-devel

Changes in v2:
* Better describe original issue in commit message.
* Add Dominik's R-b and Manuel's T-b.

When import_from_volid->() is called, the VM configuration of the
destination VM is already locked. In case the source volume belongs to
the same VM, there would be a second attempt to lock the config. In
particular, this also happens when importing from OVA, because the
source image is first extracted and belongs to the same VM.

The reason for bug #7743 is that the API call will lock before forking
a worker in the POST case, making a second lock attempt from the
different process fail. In the PUT case, the second lock attempt will
still succeed, because the lock is cached within the process in
PVE::Tools::lock_file_full(). So there also is a patch to change the
order of lock+fork around using the usual early+repeated checks
pattern.

qemu-server:

Fiona Ebner (3):
  api: disk import: remove unused wrongly named variable
  fix #7743: api: disk import: avoid locking twice when importing from
    OVA or same VM
  api: update vm: fork before locking

 src/PVE/API2/Qemu.pm | 780 ++++++++++++++++++++++---------------------
 1 file changed, 397 insertions(+), 383 deletions(-)


Summary over all repositories:
  1 files changed, 397 insertions(+), 383 deletions(-)

-- 
Generated by git-murpp 0.5.0




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-07-03 11:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-03 11:54 [PATCH-SERIES qemu-server v2 0/3] fix #7743: api: disk import: avoid locking twice when importing from OVA or same VM Fiona Ebner
2026-07-03 11:54 ` [PATCH qemu-server v2 1/3] api: disk import: remove unused wrongly named variable Fiona Ebner
2026-07-03 11:54 ` [PATCH qemu-server v2 2/3] fix #7743: api: disk import: avoid locking twice when importing from OVA or same VM Fiona Ebner
2026-07-03 11:54 ` [PATCH qemu-server v2 3/3] api: update vm: fork before locking Fiona Ebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal