Bug 1812531 - [incremental_backup] when vm is shutoff, deleting checkpoint will produce inaccurate error message
Summary: [incremental_backup] when vm is shutoff, deleting checkpoint will produce ina...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.2
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: 8.0
Assignee: Peter Krempa
QA Contact: yisun
URL:
Whiteboard:
Depends On:
Blocks: 1799015
TreeView+ depends on / blocked
 
Reported: 2020-03-11 14:11 UTC by yisun
Modified: 2020-11-17 17:47 UTC (History)
5 users (show)

Fixed In Version: libvirt-6.2.0-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-17 17:47:36 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description yisun 2020-03-11 14:11:59 UTC
Description of problem:
[incremental_backup] when vm is shutoff, deleting checkpoint will produce an unclear error message

Version-Release number of selected component (if applicable):
libvirt-6.0.0-9.module+el8.2.0+5957+7ae8988e.x86_64

How reproducible:
100%

Steps to Reproduce:
[root@hp-dl320eg8-05 pull]# virsh domstate vm1
shut off


[root@hp-dl320eg8-05 pull]# virsh checkpoint-list vm1
 Name         Creation Time
-----------------------------------------
 check_full   2020-03-11 09:52:26 -0400
 check_inc1   2020-03-11 10:00:27 -0400
 check_inc2   2020-03-11 10:02:13 -0400


[root@hp-dl320eg8-05 pull]# virsh checkpoint-delete vm1 check_full
error: Failed to delete checkpoint check_full
error: Operation not supported: incremental backup is not supported yet

Actual results:
The error message is "incremental backup is not supported yet" which is inaccurate. 

Expected results:
Error message should be clear

Comment 1 yisun 2020-03-12 05:52:45 UTC
just a remind that checkpoint-create[-as] will have same issue.

Comment 2 Peter Krempa 2020-03-26 17:23:54 UTC
Fixed upstream:

commit e05dd1abdc3b3eeac6e12ab105e56138d783af2a
Author: Peter Krempa <pkrempa>
Date:   Thu Mar 26 15:20:44 2020 +0100

    qemuCheckpointDelete: Check VM liveness first
    
    Move the liveness check prior to the capability check. If the VM is
    offline the capabilities are not initialized and thus we'd report the
    wrong error.
    
commit 4257c203737e5ef616588e80794cc705a5fb475a
Author: Peter Krempa <pkrempa>
Date:   Thu Mar 26 15:20:44 2020 +0100

    qemuCheckpointCreateXML: Check VM liveness first
    
    Move the liveness check prior to the capability check. If the VM is
    offline the capabilities are not initialized and thus we'd report the
    wrong error.

Comment 5 yisun 2020-07-17 06:31:30 UTC
Test with:
libvirt-6.5.0-1.module+el8.3.0+7323+d54bb644.x86_64

Result is: PASS

Steps:
[root@libvirt-rhel-8 ~]# virsh start vm1
Domain vm1 started

[root@libvirt-rhel-8 ~]# virsh checkpoint-create-as vm1 ck1
Domain checkpoint ck1 created

[root@libvirt-rhel-8 ~]# virsh destroy vm1
Domain vm1 destroyed

[root@libvirt-rhel-8 ~]# virsh checkpoint-delete vm1 ck1
error: Failed to delete checkpoint ck1
error: Operation not supported: cannot delete checkpoint for inactive domain

[root@libvirt-rhel-8 ~]# virsh checkpoint-create-as vm1 ck2
error: Operation not supported: cannot create checkpoint for inactive domain

Comment 8 errata-xmlrpc 2020-11-17 17:47:36 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 (virt:8.3 bug fix and enhancement update), 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-2020:5137


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