qemu-server/PVE
Fabian Ebner dbecb46f2a api: clone: fork before locking
using the familiar early+repeated checks pattern from other API calls.
Only intended functional changes are with regard to locking/forking.

For a full clone of a running VM without guest agent, this also fixes
issuing vm_{resume,suspend} calls for drive mirror completion.
Previously, those just timed out, because of not getting the lock:

> create full clone of drive scsi0 (rbdkvm:vm-104-disk-0)
> Formatting '/var/lib/vz/images/105/vm-105-disk-0.raw', fmt=raw
> size=4294967296 preallocation=off
> drive mirror is starting for drive-scsi0
> drive-scsi0: transferred 2.0 MiB of 4.0 GiB (0.05%) in 0s
> drive-scsi0: transferred 635.0 MiB of 4.0 GiB (15.50%) in 1s
> drive-scsi0: transferred 1.6 GiB of 4.0 GiB (40.50%) in 2s
> drive-scsi0: transferred 3.6 GiB of 4.0 GiB (90.23%) in 3s
> drive-scsi0: transferred 4.0 GiB of 4.0 GiB (100.00%) in 4s, ready
> all 'mirror' jobs are ready
> suspend vm
> trying to acquire lock...
> can't lock file '/var/lock/qemu-server/lock-104.conf' - got timeout
> drive-scsi0: Cancelling block job
> drive-scsi0: Done.
> resume vm
> trying to acquire lock...
> can't lock file '/var/lock/qemu-server/lock-104.conf' - got timeout

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-01-31 13:10:33 +01:00
..
API2 api: clone: fork before locking 2022-01-31 13:10:33 +01:00
CLI qm: move-disk: to not make reassign specific options fixed 2021-11-11 14:01:04 +01:00
QemuServer pci: allow override of PCI vendor/device ids 2022-01-25 10:59:23 +01:00
VZDump vzdump: increase timeout for QMP 'cont' after backup start 2021-10-27 13:51:45 +02:00
Makefile buildsys: use $(MAKE) instead of make 2019-09-24 18:06:16 +02:00
QemuConfig.pm config: rollback is possible: add blockers parameter 2021-11-08 10:34:00 +01:00
QemuMigrate.pm migrate: send updated TPM state volid to target node 2021-11-22 16:55:17 +01:00
QemuServer.pm drive mirror monitor: warn when suspend/resume/freeze/thaw calls fail 2022-01-31 13:10:33 +01:00
QMPClient.pm tree wide cleanups 2020-10-16 18:03:32 +02:00