Bug 1299688 - storage: Improve error message when delete snapshots for a non-rbd backend
Summary: storage: Improve error message when delete snapshots for a non-rbd backend
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-19 01:49 UTC by Fangge Jin
Modified: 2021-08-18 09:55 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-08-18 09:55:04 UTC


Attachments (Terms of Use)

Description Fangge Jin 2016-01-19 01:49:08 UTC
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

Comment 1 Daniel Berrangé 2021-08-18 09:55:04 UTC
Closing since there's been no effort to address this in 5 years and no active complaints from users.


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