Bug 969982

Summary: Impove error message for virsh volume command with --prealloc-metadata option
Product: Red Hat Enterprise Linux 7 Reporter: yanbing du <ydu>
Component: libvirtAssignee: Peter Krempa <pkrempa>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 7.0CC: acathrow, cwei, dyuan, mzhan, pkrempa, xuzhang
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-1.1.0-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 11:07:19 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 yanbing du 2013-06-03 09:01:02 UTC
Description of problem:
The --prealloc-metadata option for virsh volume commands(vol-clone, vol-create-as, vol-create, vol-create-from) doesn't support raw format image, so commands always fail with error:
error: unsupported flags (0x1) in function virStorageBackendCreateRaw


Version-Release number of selected component (if applicable):
libvirt-1.0.5-2.el7.x86_64 

How reproducible:
100%

Steps to Reproduce:
1. Clone or create a raw format vol with --prealloc-metadata option:

# virsh vol-clone vol new-vol default --prealloc-metadata
error: Failed to clone vol from vol
error: unsupported flags (0x1) in function virStorageBackendCreateRaw

or

# virsh  vol-create default new-vol.xml --prealloc-metadata
error: Failed to create vol from new-vol.xml
error: unsupported flags (0x1) in function virStorageBackendCreateRaw 


Actual results:
As step1.

Expected results:
Improve the error message.

Additional info:

Comment 2 Peter Krempa 2013-06-05 13:51:37 UTC
Fixed upstream:

commit 77e7f69c3b88ae0a7364fa88334a483a247d7200
Author: Peter Krempa <pkrempa>
Date:   Wed Jun 5 09:38:41 2013 +0200

    storage: Provide better error message if metadata pre-alloc is unsupported
    
    Instead of a unknown flag error report that metadata pre-allocation is
    not supported with the requested volume creation method.
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=969982

v1.0.6-27-g77e7f69

Comment 3 yanbing du 2013-07-02 11:01:04 UTC
Verify with libvirt-1.1.0-1.el7.x86_64.

# virsh vol-clone vol new-vol default --prealloc-metadata
error: Failed to clone vol from vol
error: unsupported configuration: metadata preallocation is not supported for raw volumes

#  virsh  vol-create default vol-new.xml --prealloc-metadata
error: Failed to create vol from vol-new.xml
error: unsupported configuration: metadata preallocation is not supported for raw volumes

The error message is clear enough, so move bug to VERIFIED.

Comment 4 Ludek Smid 2014-06-13 11:07:19 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.