uvtool won't clean up storage if vm does not exist
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
uvtool (Ubuntu) |
New
|
Medium
|
Unassigned |
Bug Description
libvirtd crashed while creating VMs; this left storage volumes associated with the instance present. uvt-kvm destroy foo should clean up all related volumes, but because the VM is not currently defined, uvtool does not remove the volumes. However, if one attempts to create a new machine with the same name, uvtool complains that the volume already exists.
1. Ubuntu Vivid 15.04
2. $ apt-cache policy uvtool-libvirt
uvtool-libvirt:
Installed: 0~bzr99-0ubuntu1
Candidate: 0~bzr99-0ubuntu1
Version table:
*** 0~bzr99-0ubuntu1 0
500 http://
100 /var/lib/
3. uvt-kvm delete foo should remove the VM definition (if present) and the related storage pool volumes (if present)
4. uvt-kvm delete stops after checking if foo is defined and then exits if it is not.
ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: uvtool 0~bzr99-0ubuntu1
ProcVersionSign
Uname: Linux 3.19.0-15-generic ppc64le
ApportVersion: 2.17.2-0ubuntu1
Architecture: ppc64el
Date: Wed May 6 01:33:25 2015
PackageArchitec
ProcEnviron:
TERM=screen
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcLoadAvg: 0.14 0.95 1.22 1/1236 153263
ProcLocks:
1: POSIX ADVISORY WRITE 149496 00:12:496503 0 0
2: FLOCK ADVISORY WRITE 53972 00:32:362976 0 EOF
3: POSIX ADVISORY WRITE 2114 00:12:99335 0 EOF
4: POSIX ADVISORY WRITE 2130 00:12:90143 0 EOF
5: FLOCK ADVISORY WRITE 2181 00:12:93227 0 EOF
ProcSwaps:
Filename Type Size Used Priority
/swap.img file 8388544 0 -1
ProcVersion: Linux version 3.19.0-15-generic (buildd@fisher02) (gcc version 4.9.2 (User Name 4.9.2-10ubuntu13) ) #15-User Name SMP Thu Apr 16 23:32:13 UTC 2015
SourcePackage: uvtool
UpgradeStatus: No upgrade log present (probably fresh install)
cpu_cores: Number of cores present = 20
cpu_coreson: Number of cores online = 20
cpu_smt: SMT is off
Changed in uvtool (Ubuntu): | |
importance: | Undecided → Medium |
Thanks Ryan, I'll look into this.
I think there's code in uvtool that tries to unroll a failed create. Is it that this isn't working correctly, or did your libvirt crash kill uvtool before it could unroll?
The problem with trying to clean up later on a destroy is that uvtool can't detect which storage volumes relate to a VM if the VM's definition does not exist. I'm not sure that uvtool should try and guess in this case.