Change in vdsm[ovirt-3.5]: qemuimg: Handle new output format

danken at redhat.com danken at redhat.com
Wed Sep 3 20:07:11 UTC 2014


Dan Kenigsberg has submitted this change and it was merged.

Change subject: qemuimg: Handle new output format
......................................................................


qemuimg: Handle new output format

The current qemu-img info parsing logic assumes that if the output is
long enough, the backing image will appear on line 6.  In newer qemu
versions, some additional information has been added to the output.  In
the case of no backing file, the additional lines will fail to parse.
Handle this by trying to parse line 6 as a backing file and ignoring
regex parse errors for this line only.

Sample output from qemu-2.0.0-rc1:

[alitke at lager qemu-2.0.0-rc1]$ ./qemu-img info base.img
image: base.img
file format: qcow2
virtual size: 1.0G (1073741824 bytes)
disk size: 196K
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
[alitke at lager qemu-2.0.0-rc1]$ ./qemu-img info leaf.img
image: leaf.img
file format: qcow2
virtual size: 1.0G (1073741824 bytes)
disk size: 196K
cluster_size: 65536
backing file: base.img
Format specific information:
    compat: 1.1
    lazy refcounts: false

Change-Id: Ic229198ab7c2bb9743bdf8629416131186115431
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1127294
Signed-off-by: Adam Litke <alitke at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/27552
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/32321
Reviewed-by: Federico Simoncelli <fsimonce at redhat.com>
Reviewed-by: Francesco Romani <fromani at redhat.com>
---
M lib/vdsm/qemuimg.py
M tests/Makefile.am
A tests/qemuimgTests.py
3 files changed, 138 insertions(+), 8 deletions(-)

Approvals:
  Adam Litke: Verified
  Federico Simoncelli: Looks good to me, but someone else must approve
  Dan Kenigsberg: Looks good to me, approved
  Francesco Romani: Looks good to me, but someone else must approve



-- 
To view, visit http://gerrit.ovirt.org/32321
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic229198ab7c2bb9743bdf8629416131186115431
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: automation at ovirt.org


More information about the vdsm-patches mailing list