Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2031678

Summary: [machines] In s390x, the VM is not disappear after deleting with checking the checkbox of its disk
Product: Red Hat Enterprise Linux 8 Reporter: YunmingYang <yunyang>
Component: cockpit-appstreamAssignee: Simon Kobyda <skobyda>
Status: CLOSED ERRATA QA Contact: YunmingYang <yunyang>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.6CC: mpitt, skobyda, wshi, xchen, ymao
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.6   
Hardware: s390x   
OS: Linux   
Whiteboard:
Fixed In Version: cockpit-appstream-261-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-10 13:42:00 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 YunmingYang 2021-12-13 08:22:37 UTC
Description of problem:
Create a VM with follow parameters
Name                             Unique name
Installation type              Local install media (ISO image or distro install tree)
Operating system           Alpine Linux 3.10
Storage
    Create new volume
    Size       10GiB
    Memory 1GiB
Immediately start VM     checked
Then click the "Create" button of the "Create VM" dialog, the VM will be created successfully. Then Delete the VM, and check the checkbox of its disk(not cdrom). After clicking the "Delete" button of deletion dialog, the VM is still there with shutoff status


Version-Release number of selected components (if applicable):
cockpit-258-1.el8.s390x
cockpit-machines-255-1.el8.noarch
libvirt-dbus-1.3.0-2.module+el8.6.0+12861+13975d62.s390x


How reproducible:
100%


Steps to Reproduce:
1 Log in cockpit, then switch to machines page
2 Click the "Create VM" button, then fill the dialog with follow parameters
Name                             Unique name
Installation type              Local install media (ISO image or distro install tree)
Operating system           Alpine Linux 3.10
Storage
    Create new volume
    Size       10GiB
    Memory 1GiB
Immediately start VM     checked
3 Click the "Create" button of the "Create VM" dialog.
4 Click the "Delete" button of the VM extend operation list, then click the "Delete" button of the popup deletion confirmation dialog


Actual results:
1 After step 4, the VM is still there with shutoff status


Expected results:
1 After step 4, the VM should disappear


Additional info:
1 If unchecking the checkbox of the VM disk in the popup deletion confirmation dialog, the VM disappear after deletion

Comment 1 Martin Pitt 2021-12-14 13:00:58 UTC
Hello Yunming, thanks for the report!

As it's difficult to get access to s390x machines, can you please capture `sudo journalctl -b` after this happens? Do you happen to have an instance which we could access (through the internal network)?

Comment 2 YunmingYang 2021-12-14 15:39:19 UTC
I have already returned the RHEL 8.6 s390x machine to beaker, and I couldn't reproduce this issue with a RHEL 9 s390x. So I will try to reproduce a new RHEL 8.6 s390x machine. And submit the results once reproduced

Comment 4 Martin Pitt 2021-12-15 15:07:37 UTC
Thanks! That log is interesting:

systemd-machined[988]: Machine qemu-1-test terminated.
libvirtd[3982]: cannot parse process status data
libvirtd[3982]: internal error: child reported (status=125): unable to stat: /var/lib/libvirt/images/test.qcow2: No such file or directory
libvirtd[3982]: unable to stat: /var/lib/libvirt/images/test.qcow2: No such file or directory
libvirtd[3982]: Unable to run security manager transaction
libvirtd[3982]: internal error: child reported (status=125): Unable to get XATTR trusted.libvirt.security.ref_dac on /var/lib/libvirt/images/test.qcow2: No such file or directory
libvirtd[3982]: Unable to get XATTR trusted.libvirt.security.ref_dac on /var/lib/libvirt/images/test.qcow2: No such file or directory
libvirtd[3982]: Unable to remove disk metadata on vm test from /var/lib/libvirt/images/test.qcow2 (disk target vda)

So I figure these errors abort the VM deletion. Simon, does that ring a bell? Does c-machines do the image removal by itself, or does libvirt do that? Maybe we first need to remove the image and then clean up the files?

Comment 5 Simon Kobyda 2022-01-04 13:41:08 UTC
Path PR: https://github.com/cockpit-project/cockpit-machines/pull/502

Comment 8 YunmingYang 2022-01-28 13:45:41 UTC
Test Versions:
cockpit-258-1.el8.s390x
cockpit-machines-261-1.el8.noarch
libvirt-dbus-1.3.0-2.module+el8.6.0+12861+13975d62.s390x

Test Steps:
1 Log in cockpit, then switch to machines page
2 Click the "Create VM" button, then fill the dialog with follow parameters
Name                             test
Installation type                Local install media (ISO image or distro install tree)
Installation source              /var/lib/libvirt/images/alpine.iso
Operating system(auto detected)  Alpine Linux 3.10
Storage
    Create new volume
    Size     auto detected
    Memory   auto detected
Immediately start VM     checked
3 Click the "Create" button of the "Create VM" dialog.
4 Delete the VM image file by executing "rm -rf /var/lib/libvirt/images/test.qcow2" in the host
5 Click the "Delete" button of the VM extend operation list, then click the "Delete" button of the popup deletion confirmation dialog
6 Check the VM by executing "virsh list --all"

Test Results:
After step 5, the VM disappear from the machines page, after step 6, there is no the VM created in above steps

According to the results, move status to VERIFIED.

Comment 10 errata-xmlrpc 2022-05-10 13:42:00 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 (cockpit-appstream 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-2022:1806