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 1306564 - Centos-Libvirt: For running vm, virsh vol-delete command fails while deleting SCSI disk image which is added through virt-manager: cannot unlink file 'XXX': Success
Summary: Centos-Libvirt: For running vm, virsh vol-delete command fails while deleting...
Keywords:
Status: CLOSED DUPLICATE of bug 1293804
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.2
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: rc
: 7.3
Assignee: Libvirt Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-11 10:09 UTC by amaresh
Modified: 2016-02-11 19:25 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-11 19:25:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description amaresh 2016-02-11 10:09:34 UTC
Description of problem:

On Centos machine, if we try to delete the SCSI disk image for running vm (which is added via virt-manager) through virsh vol-delete command, getting "cannot unlink file 'XXX': Success" error. 

This error occurs intermittently and occurs only if we try to delete disk image when vm is running.

Version-Release number of selected component (if applicable):

OS:CentOS Linux release 7.2.1511

Libvirt:
[root@CV-HJ-CentOS7-02 images]# virsh version
Compiled against library: libvirt 1.2.17
Using library: libvirt 1.2.17
Using API: QEMU 1.2.17
Running hypervisor: QEMU 1.5.3


How reproducible:


Steps to Reproduce:
1. Add SCSI disk from virt manager to VM
2. Start VM from virt-manager and confirm disk is attached as SCSI.
5. Try to delete the newly added SCSI disk using virsh vol-delete command:
virsh # vol-delete /var/lib/libvirt/images/<filename>.img
 

Actual results:
It is giving Following error:
error: Failed to delete vol /var/lib/libvirt/images/<filename>.img
error: cannot unlink file '/var/lib/libvirt/images/<filename>.img': Success


Expected results:
It should not give any error and should delete the disk image properly.


Additional info:

Comment 1 Laine Stump 2016-02-11 15:09:11 UTC
Fedora Rawhide is not CentOS, and CentOS will not have the version of libvirt that is currently in Fedora Rawhide for "awhile". CentOS has their own downstream bugtracker, which might be the most appropriate place for filing bugs against the versions of packages in CentOS, but since CentOS is based on the corresponding RHEL release, it's also reasonable to file such bugs against the RHEL7 version of the package - this is why I've moved this BZ from Fedora/Rawhide/libvirt to RHEL7/libvirt.

As for the bug, it's highly possible your problem is fixed by the following upstream commit:

commit cb19cff468432e55366014658f405066ce06c2f2
Author: John Ferlan <jferlan>
Date:   Wed Sep 30 17:37:27 2015 -0400

    virfile: Fix error path for forked virFileRemove

This commit reports eliminating the same error message. It first appeared upstream in 1.2.21, and I don't see it backported to the RHEL7 libvirt build.

Comment 3 Cole Robinson 2016-02-11 19:25:00 UTC

*** This bug has been marked as a duplicate of bug 1293804 ***


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