]> git.proxmox.com Git - qemu-server.git/commit
API/create: move locking inside worker
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 1 Jun 2018 14:37:39 +0000 (16:37 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 12 Jun 2018 07:44:39 +0000 (09:44 +0200)
commit8ba8418ca1d1a76a7e24c34045ca7702b0cd969d
treedc98733aa930cf47d98daf344555201b85888ac6
parentb8ff6fb2a6bf1e0215125c3014eca44f5d5011e7
API/create: move locking inside worker

Move the locking inside worker, so that the process doing the actual
work (create or restore) holds the lock, and can call functions which
do locking without deadlocking.

This mirrors the behaviour we use for containers, and allows to add
an 'autostart' parameter which starts the VM after successful
creation. vm_start needs the lock and as not the worker but it's
parents held it, it couldn't know that it was actually save to
continue...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/API2/Qemu.pm