]> git.proxmox.com Git - qemu-server.git/commit - PVE/QemuServer.pm
pending apply/hotplug: don't hard code force to true
authorOguz Bektas <o.bektas@proxmox.com>
Tue, 22 Oct 2019 10:34:27 +0000 (12:34 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 22 Oct 2019 10:45:51 +0000 (12:45 +0200)
commitfb4d1ba27e192b9611d1fc97ad464160b61832f2
treeb14be7b0ba13a387cfc22c088d910c1374120e8c
parent6b4b369fe35eb43ac08cf5609b488088c537926d
pending apply/hotplug: don't hard code force to true

Each pending options has a hash value which has the 'force'
information encoded as entry. But, this can be { force => 1 } or
{ force => 0 }, so we actually need to check the value and not just
set force to the hash directly, as else we have force always truthy..

fixes a bug where 'detach' caused disks to be destroyed immediately,
because $force parameter was always true since hash is true.

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/QemuServer.pm