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 1529059 - The error message is not clear when upload a bigger file by vol-upload
Summary: The error message is not clear when upload a bigger file by vol-upload
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.5
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: John Ferlan
QA Contact: Meina Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-26 08:17 UTC by Fangge Jin
Modified: 2018-10-30 09:52 UTC (History)
4 users (show)

Fixed In Version: libvirt-4.5.0-1.el7
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2018-10-30 09:52:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:3113 0 None None None 2018-10-30 09:52:59 UTC

Description Fangge Jin 2017-12-26 08:17:22 UTC
Description of problem:
The error message is not clear when upload a bigger file by vol-upload

Version-Release number of selected component:
libvirt-3.9.0-6.virtcov.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Prepare a storage pool, for example:
# virsh pool-dumpxml disk-sdb
<pool type='disk'>
<name>disk-sdb</name>
<uuid>dcb9c7ee-0932-43ea-b68c-32644cc2b17e</uuid>
<capacity unit='bytes'>320070320640</capacity>
<allocation unit='bytes'>970550784</allocation>
<available unit='bytes'>319099737600</available>
<source>
<device path='/dev/sdb'>
<freeExtent start='970583040' end='320070320640'/>
</device>
<format type='dos'/>
</source>
<target>
<path>/dev</path>
</target>
</pool>

2. Create a volume(300M) in the pool:
# virsh vol-create-as --pool disk-sdb --name sdb1 --capacity 300M

3. Prepare a large file(500M) to be uploaded:
# ll /tmp/upload-bigger -h
-rw-r--r--. 1 root root 500M Dec 22 22:49 /tmp/upload-bigger

4. Upload the file:
# virsh vol-upload --vol sdb1 /tmp/upload-bigger --pool disk-sdb
error: cannot send data to volume sdb1
error: Library function returned error but did not set virError


Actual results:
Vol-upload failed as expected, but the error message is not clear

Expected results:
Output clear error message when vol-upload fails.


Additional info:
libvirtd has log:
2017-12-26 05:30:39.335+0000: 9329: error : virFDStreamThreadDoWrite:529 : Unable to write /dev/sdb1: No space left on device
2017-12-26 05:30:39.336+0000: 3738: error : virFDStreamWrite:802 : cannot write to stream: Bad file descriptor

Comment 2 John Ferlan 2018-06-06 14:17:35 UTC
A patch has been posted upstream to resolve this:

https://www.redhat.com/archives/libvir-list/2018-June/msg00464.html

Comment 3 John Ferlan 2018-06-07 00:47:32 UTC
The patch has been pushed upstream:

commit 5babc51912f91f196922b4149ce7e90ceafb5f9c
Author: John Ferlan <jferlan>
Date:   Wed Jun 6 08:38:30 2018 -0400

    fdstream: Report error from the I/O thread
    
...
    
    Commit id 0fe4aa14 added the thread specific error message
    reporting (or save) to virFDStreamEvent; however, as processing
    goes via virStream{Send|SendHole|Recv} via calls from
    daemonStreamHandle{WriteData|Hole|Read} the last error
    gets reset in the main libvirt API's thus, whatever error
    may have been set as last error will be cleared prior to
    the error paths using it resulting in the generic error
    on the client side.
    
    For each of the paths that check threadQuit or threadErr,
    check if threadErr was set and set it agian if there isn't
    a last error (e.g. some other failure) set so that the
    message can be provided back to the client.
    
    Signed-off-by: John Ferlan <jferlan>
    ACKed-by: Michal Privoznik <mprivozn>


$ git describe 5babc51912f91f196922b4149ce7e90ceafb5f9c
v4.4.0-141-g5babc51912
$

Comment 6 Meina Li 2018-07-30 08:34:02 UTC
Verified on libvirt-4.5.0-4.el7.x86_64.

Test steps:
1. Prepare a storage pool with iscsi disk, for example:
# virsh pool-dumpxml disk-sdb
<pool type='disk'>
<name>disk-sdb</name>
<uuid>dcb9c7ee-0932-43ea-b68c-32644cc2b17e</uuid>
<capacity unit='bytes'>320070320640</capacity>
<allocation unit='bytes'>970550784</allocation>
<available unit='bytes'>319099737600</available>
<source>
<device path='/dev/sdb'>
<freeExtent start='970583040' end='320070320640'/>
</device>
<format type='dos'/>
</source>
<target>
<path>/dev</path>
</target>
</pool>

2. Create a volume(300M) in the pool:
# virsh vol-create-as --pool disk-sdb --name sdb1 --capacity 300M
# virsh vol-list disk-sdb
 Name                 Path                                    
------------------------------------------------------------------------------
 sdb1                 /dev/sdb1

3. Prepare a large file(500M) to be uploaded:
# qemu-img create /tmp/upload-bigger 500M
Formatting '/tmp/upload-bigger', fmt=raw size=524288000
# ll /tmp/upload-bigger -h
-rw-r--r--. 1 root root 500M Dec 22 22:49 /tmp/upload-bigger

4. Upload the file:
# virsh vol-upload --vol sdb1 /tmp/upload-bigger --pool disk-sdb
error: cannot send data to volume sdb1
error: Unable to write /dev/sdb1: No space left on device

5. Test on logical pool, and also can get expected results.

According to test results, move this bug to verified.

Comment 8 errata-xmlrpc 2018-10-30 09:52:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:3113


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