Bug 1662849 - virsh snapshot-list --parent fails
Summary: virsh snapshot-list --parent fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: 8.0
Assignee: Ján Tomko
QA Contact: gaojianan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-02 08:22 UTC by gaojianan
Modified: 2019-05-29 16:05 UTC (History)
7 users (show)

Fixed In Version: libvirt-5.0.0-3.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-29 16:04:59 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:1293 None None None 2019-05-29 16:05:20 UTC

Description gaojianan 2019-01-02 08:22:14 UTC
Description of problem:
As subject

Version-Release number of selected component (if applicable):
libvirt-4.10.0-1.module+el8+2317+367e35b5.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Create three external disk snapshot
# for i in s1 s2 s3;do virsh snapshot-create-as demo $i --disk-only;done
Domain snapshot s1 created
Domain snapshot s2 created
Domain snapshot s3 created

2.Get name of parent snapshot
# virsh snapshot-list rhel6-qcow2 --parent
error: internal error: Incorrect number of cells in a table row

3.

Actual results:
Get an error.

Expected results:
Should show like:
Name Creation Time State Parent
------------------------------------------------------------
s1 2014-05-12 17:28:13 +0800 disk-snapshot (null)
s2 2014-05-12 17:28:13 +0800 disk-snapshot s1
s3 2014-05-12 17:28:14 +0800 disk-snapshot s2

Additional info:

Comment 1 Ján Tomko 2019-02-14 13:48:45 UTC
Upstream patch:
https://www.redhat.com/archives/libvir-list/2019-February/msg00875.html

Comment 2 Ján Tomko 2019-02-14 15:43:25 UTC
Pushed upstream as:
commit d3e5c3605a66c04e809591fb4920f5d72e72a736
Author:     Ján Tomko <jtomko@redhat.com>
CommitDate: 2019-02-14 16:37:24 +0100

    virsh: fix snapshot list --parent
    
    The root snapshot does not have a parent.
    Use NULLSTR_EMPTY to pass an empty string instead of putting
    too few columns in the table.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1662849
    
    Signed-off-by: Ján Tomko <jtomko@redhat.com>
    Reviewed-by: Eric Blake <eblake@redhat.com>

git describe: v5.0.0-397-gd3e5c3605a

Comment 4 gaojianan 2019-02-25 07:32:23 UTC
Verified on:
qemu-kvm-3.1.0-15.module+el8+2792+e33e01a0.x86_64
libvirt-5.0.0-2.module+el8+2779+3106feb7.x86_64

1.Create three external disk snapshot
# for i in s1 s2 s3;do virsh snapshot-create-as q35demo $i --disk-only;done
Domain snapshot s1 created
Domain snapshot s2 created
Domain snapshot s3 created

2.Get name of parent snapshot
# virsh snapshot-list q35demo --parent
 Name   Creation Time               State           Parent
------------------------------------------------------------
 s1     2019-02-25 10:45:53 +0800   disk-snapshot   
 s2     2019-02-25 10:45:54 +0800   disk-snapshot   s1
 s3     2019-02-25 10:45:54 +0800   disk-snapshot   s2


Works as expected.

Comment 6 errata-xmlrpc 2019-05-29 16:04:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:1293


Note You need to log in before you can comment on or make changes to this bug.