[pve-devel] [PATCH qemu-server v4 2/3] Add ImportDisk module to import external disk images into a VM

Fabian Grünbichler f.gruenbichler at proxmox.com
Fri May 12 14:39:01 CEST 2017


On Fri, May 12, 2017 at 02:24:00PM +0200, Fabian Grünbichler wrote:
> and one more which I initially missed, see below
> 
> On Tue, May 09, 2017 at 04:26:05PM +0200, Emmanuel Kasper wrote:
> > Each disk passed as paramater is add as 'unused[n]' in the vm.conf
> > (the default) or ide[n]|scsi[n]|sata[n]
> > We rely on qemu-img(1) convert heuristics to detect the file type,
> > as this works in most case.
> 
> ...
> 
> > +	my $vm_conf = PVE::QemuConfig->load_config($vmid);
> 
> wrong order, first lock, then load - otherwise this becomes racy.
> 

I am pretty sure this is also missing a check_lock after the
lock_config? otherwise this could modify the configuration while a
backup/migrate/.. task is running, which must not happen..




More information about the pve-devel mailing list