Bug 1299688 - storage: Improve error message when delete snapshots for a non-rbd backend
storage: Improve error message when delete snapshots for a non-rbd backend
Status: NEW
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
unspecified
x86_64 Linux
unspecified Severity low
: ---
: ---
Assigned To: Libvirt Maintainers
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-18 20:49 EST by Fangge Jin
Modified: 2016-05-22 22:39 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Fangge Jin 2016-01-18 20:49:08 EST
Description of problem:
The error message when deleting snapshots for a non-rbd backend is not clear:
# virsh undefine rhel7.2 --delete-snapshots --remove-all-storage
Domain rhel7.2 has been undefined
error: Failed to remove storage volume 'vda'(/var/lib/libvirt/images/test.img)
error: unsupported flags (0x2) in function virStorageBackendFileSystemVolDelete


# virsh vol-delete /var/lib/libvirt/images/test.img --delete-snapshots
error: Failed to delete vol /var/lib/libvirt/images/test.img
error: unsupported flags (0x2) in function virStorageBackendFileSystemVolDelete


Version-Release number of selected component (if applicable):
# git describe
v1.3.1-rc2



How reproducible:
100%

Steps to Reproduce:
1. Prepare a volume in default storage pool
# virsh vol-list default
 Name                 Path                                    
------------------------------------------------------------------------------
 test.img             /var/lib/libvirt/images/test.img    

2.Try to delete the volume with its snapshots:
# virsh vol-delete /var/lib/libvirt/images/test.img --delete-snapshots
error: Failed to delete vol /var/lib/libvirt/images/test.img
error: unsupported flags (0x2) in function virStorageBackendFileSystemVolDelete

3.Prepare a guest with a non-rbd disk:
# virsh domblklist rhel7.2
Target     Source
------------------------------------------------
vda        /var/lib/libvirt/images/test.img

Try to undefine the guest with --delete-snapshots:
# virsh undefine rhel7.2 --delete-snapshots --remove-all-storage
Domain rhel7.2 has been undefined
error: Failed to remove storage volume 'vda'(/var/lib/libvirt/images/test.img)
error: unsupported flags (0x2) in function virStorageBackendFileSystemVolDelete


Actual results:
As step 2&3, the error message is not clear.

Expected results:
The error message is clear, like:
error: delete snapshots is not supported for non-rbd backend

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