Bug 2213429

Summary: [Machines] The vm can not be deleted with internal&external snapshot
Product: Red Hat Enterprise Linux 9 Reporter: Xianghua Chen <xchen>
Component: cockpit-machinesAssignee: Simon Kobyda <skobyda>
Status: CLOSED MIGRATED QA Contact: Xianghua Chen <xchen>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.3CC: kkoukiou, qzhang, wshi, ymao, yunyang
Target Milestone: rcKeywords: MigratedToJIRA, Reopened
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-15 14:13:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Xianghua Chen 2023-06-08 07:07:52 UTC
Description of problem:
[Machines] The vm can not be deleted with internal&external snapshot

Version-Release number of selected components (if applicable):
cockpit-machines-291-1.el9.noarch
cockpit-292-1.el9.x86_64
libvirt-dbus-1.4.1-5.el9.x86_64
libvirt-client-9.3.0-2.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Prepare a vm , like cirros

2. Enter vm details page, click "Create snapshot", fillin :
Name: test1
Description: internal_snapshot

3. On the host, use virsh to create a external_snapshot :
# virsh snapshot-create-as --domain cirros --name test2 --description 'external_snapshot' --disk-only

4. Refresh the vm details page

5. Try to delete the test2, there will be error:
Snapshot test2 could not be deleted
Operation not supported: deleting external snapshot that has internal snapshot as parent not supported

6. Try to delete the test1, there will be error:
Snapshot test1 could not be deleted
Operation not supported: disk image 'vda' for internal snapshot 'test1' is not the same as disk image currently used by VM

7. Try to delete the vm, there will be error:
Danger alert:Could not delete cirros
Operation not supported: deleting external snapshot that has internal snapshot as parent not supported


Actual results:
See step5 & step6 & step7.

Expected results:
Can delete in step5/6/7, at least can delete the vm at last.

Additional info:

Comment 1 Simon Kobyda 2023-06-21 10:33:06 UTC
Libvirt still doesn't support operations related to external snapshots, and there is nothing we can do about it. See libvirt bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1519002

And the idea behind external/internal snapshots division is that we should be able to use the same APIs for snapshot operations, nevertheless if we are interacting with internal or external snapshot. So once libvirt implements all the operations for external snapshots, they should start working seaminglessly without us having to change anything.

So I think this bugzilla is not really relevant and propose to close it as CLOSED - CANTFIX

Comment 2 Simon Kobyda 2023-06-21 10:34:50 UTC
Oh wait, now I just realized that we delete snapshots manually when VM is deleted, so we can actually do something about it. Re-opening it

Comment 4 RHEL Program Management 2023-09-15 14:12:02 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 5 RHEL Program Management 2023-09-15 14:13:58 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.