Bug 22098 - Defekte Images im Pool führen zu Fehler beim Aktualisieren der Pool-Infos
Defekte Images im Pool führen zu Fehler beim Aktualisieren der Pool-Infos
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Virtualization - UVMM
UCS 2.4
Other Linux
: P5 normal (vote)
: UCS 3.1
Assigned To: Philipp Hahn
Janek Walkenhorst
: interim-3
: 26648 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-05 11:26 CEST by Andreas Büsching
Modified: 2012-12-12 21:11 CET (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Büsching univentionstaff 2011-04-05 11:26:47 CEST
Wenn im Pool ein Image liegt, dass auf ein Master-image verweist, welches nicht mehr existiert, dann führt das zu einem Traceback im UVMMd. Dadurch werden die Informationen zu allen Images im Pool nicht mehr aktualisiert:

2011-04-05 10:58:49,498 - uvmmd.command - DEBUG - STORAGE_VOLUMES qemu://dacke.knut.univention.de/system]
2011-04-05 10:58:49,505 - uvmmd.unix - ERROR - [36] Exception: Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/univention/uvmm/unix.py", line 150, in handle_command
    res = cmd(self, command)
  File "/usr/lib/python2.4/site-packages/univention/uvmm/commands.py", line 319, in STORAGE_VOLUMES
    volumes = storage.get_storage_volumes( request.uri, request.pool, request.type )
  File "/usr/lib/python2.4/site-packages/univention/uvmm/storage.py", line 204, in get_storage_volumes
    xml = vol.XMLDesc( 0 )
  File "/usr/lib/python2.4/site-packages/libvirt.py", line 1260, in XMLDesc
    if ret is None: raise libvirtError ('virStorageVolGetXMLDesc() failed', vol=self)
libvirtError: cannot open volume '/var/lib/libvirt/templates/single/UCS/2.4-1_Master_i386/2.4-1_Master_i386.qcow2': No such file or directory
Comment 1 Philipp Hahn univentionstaff 2012-03-28 11:25:35 CEST
*** Bug 26648 has been marked as a duplicate of this bug. ***
Comment 2 Philipp Hahn univentionstaff 2012-06-22 13:39:14 CEST
Siehe <svn+ssh://billy.knut.univention.de/var/svn/dev/branches/ucs-3.0/ucs/virtualization/univention-virtual-machine-manager-daemon/scripts-dev/check-vms.py> für ein Skript, um defekte VMs zu erkennen.
Bei der Entwicklung davon sind mir folgende Dinge aufgefallen:
1. libvirt.open('qemu:///system').storageVolLookupByPath('floating.qcow2').XMLDesc(0) liefert einen Fehler, wenn das backing-Volume nicht mehr existiert.
2. Control-Zeichen im VM- oder Volume-Namen führen zu einer Exception im expat-XML-Parser.
Comment 3 Philipp Hahn univentionstaff 2012-11-07 15:47:50 CET
(In reply to comment #2)
> 1.
> libvirt.open('qemu:///system').storageVolLookupByPath('floating.qcow2').XMLDesc(0)
> liefert einen Fehler, wenn das backing-Volume nicht mehr existiert.

Das ist weiterhin ein Problem, das verstärkt wieder auftauchte und deswegen jetzt noch korrigiert wurde. Der Patch ist nur für libvirt-0.9.12 relevant, in 1.0.0+git ist das Problem zwar auch (wieder) akut, wird dort aber anders gelöst (ich diskutiere das gerade noch auf der ML aus).

svn36992, libvirt_0.9.12-5.116.201211071530
ChangeLog: svn15508
\item Broken qcow2 files missing their backing store no longer prohibit the storage pool form starting (\ucsBug{22098}).

QA:
  virsh vol-create-as --format qcow2 default back.qcow2 1G
  virsh vol-create-as --format qcow2 --backing-vol-format qcow2 --backing-vol back.qcow2 default next.qcow2 1G
  virsh vol-delete --pool default back.qcow2
  virsh vol-dumpxml --pool default next.qcow2


> 2. Control-Zeichen im VM- oder Volume-Namen führen zu einer Exception im
> expat-XML-Parser.

Das ist Bug #26681.
Comment 4 Janek Walkenhorst univentionstaff 2012-11-21 17:30:44 CET
Verwaiste Images führen zu keinen Problemen mehr.

Changelog OK.
Comment 5 Stefan Gohmann univentionstaff 2012-12-12 21:11:02 CET
UCS 3.1-0 has been released: 
 http://forum.univention.de/viewtopic.php?f=54&t=2125

If this error occurs again, please use "Clone This Bug".