[pve-devel] [RFC cloudinit] delete cloudinit images as if they weren't cdroms

Alexandre DERUMIER aderumier at odiso.com
Tue Aug 4 16:43:48 CEST 2015


+    return 0 if $exclude_cloudinit && $drive->{file} =~ m@[:/]vm-\d+-cloudinit\.$QEMU_FORMAT_RE@;

I think this will not match disks on block storage ? 

file sample  : 100/vm-100-cloudinit.raw
block sample : vm-100-cloudinit







----- Mail original -----
De: "Wolfgang Bumiller" <w.bumiller at proxmox.com>
À: "pve-devel" <pve-devel at pve.proxmox.com>
Envoyé: Mardi 4 Août 2015 14:47:40
Objet: [pve-devel] [RFC cloudinit] delete cloudinit images as if they	weren't cdroms

To be applied to the v8 series. 

I gave drive_is_cdrom a flag for whether to treat cloudinit images as 
cdrom drive (which it now does by default), in order to easily be able 
to exclude it in places where it makes sense. $test_deallocate_storage 
for instance now doesn't treat cloudinit images as cdrom which means 
deletion works like with other disks: first they become unused, then 
they can be deleted which will also delete the associated files. 
(I also used the occasion to deduplicate the format extension regex a 
little.) 

I hope it's okay that I haven't reposted the entire series this time. 

Wolfgang Bumiller (1): 
delete cloudinit images as if they weren't cdroms 

PVE/API2/Qemu.pm | 2 +- 
PVE/QemuServer.pm | 14 +++++++++----- 
2 files changed, 10 insertions(+), 6 deletions(-) 

-- 
2.1.4 


_______________________________________________ 
pve-devel mailing list 
pve-devel at pve.proxmox.com 
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 



More information about the pve-devel mailing list