]> git.proxmox.com Git - qemu-server.git/commit
fix existing cloudinit volume not available for file_size_info
authorMira Limbeck <m.limbeck@proxmox.com>
Wed, 15 May 2019 10:53:24 +0000 (12:53 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 15 May 2019 14:31:52 +0000 (16:31 +0200)
commit9680b09d646bb0fe59fdcc6b3891f812b084aa61
treec038570527de640c0d1c2cba4c9920369e0ef4ac
parent96f00fd866e7691dee7b315af165595c7bd23a50
fix existing cloudinit volume not available for file_size_info

file_size_info can't find the file if it is not available, e.g.,
RBD storage with KRBD or LVM where the volume was not yet activated,
returns then 0, which we interpret as the disk not existing, thus
call vdisk_alloc which errors as the disk, in fact, really already exists.

With this patch we call activate_volume before trying
file_size_info, so if the volume exists we get it available and else
we can really create it.
If the disk does not exist and is created with vdisk_alloc we still
require an additional call to activate_volume for the new disk.

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/QemuServer/Cloudinit.pm