Bug 969982 - Impove error message for virsh volume command with --prealloc-metadata option
Impove error message for virsh volume command with --prealloc-metadata option
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.0
Unspecified Unspecified
medium Severity low
: rc
: ---
Assigned To: Peter Krempa
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-03 05:01 EDT by yanbing du
Modified: 2014-06-17 20:51 EDT (History)
6 users (show)

See Also:
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 07:07:19 EDT
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 yanbing du 2013-06-03 05:01:02 EDT
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 09:51:37 EDT
Fixed upstream:

commit 77e7f69c3b88ae0a7364fa88334a483a247d7200
Author: Peter Krempa <pkrempa@redhat.com>
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 07:01:04 EDT
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 07:07:19 EDT
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.

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