[pve-devel] pve-manager: bug or feature?

Michael Rasmussen mir at datanom.net
Tue Jun 13 11:48:02 CEST 2017


On Mon, 12 Jun 2017 13:20:13 +0200
Fabian Grünbichler <f.gruenbichler at proxmox.com> wrote:

> 
> you are wrong - vdisk_free is called, but if it fails it is treated as
> non-fatal error (since we want to destroy the whole VM), and a simple
> warning is logged. this is correct and intended, because once you delete
> the first disk, the VM is broken anyhow, even if you can't free the
> second(/third/fourth/..) disk...
> 
You are right. vdisk_free is called but bails before the free_image
method is called in the storage plugin.
die "base volume '$volname' is still in use by linked clones\n"
    if &$volume_is_base_and_used__no_lock($scfg, $storeid, $plugin, $volname);

So if vdisk_free bails why is the vmid.conf file removed? Bailing here
means nothing has changed but because vmid.conf is removed the user
cannot get to the vm anymore through the gui and are left to handle the
situation from the command line. IMHO the user should not be force to
go to the command line if there is no reason to do this, command line
should always be last resort.

> vdisk_free does a check if the volume is a base volume which is still
> referenced by a linked clone, which is why you get the warning in the
> log. it probably makes sense to add an additional check and iterate over
> all disks and check if they are base and used iff the VM is a template.
> 
I don't see the point. If a VM is converted to a template all disks, by
convention, will be referenced by linked clones if linked clones exists.

-- 
Hilsen/Regards
Michael Rasmussen

Get my public GnuPG keys:
michael <at> rasmussen <dot> cc
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E
mir <at> datanom <dot> net
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C
mir <at> miras <dot> org
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917
--------------------------------------------------------------
/usr/games/fortune -es says:
Every country has the government it deserves.
		-- Joseph De Maistre
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.proxmox.com/pipermail/pve-devel/attachments/20170613/e1683f53/attachment.sig>


More information about the pve-devel mailing list