Bug 1529256 - Error message is not correct when "vol-upload" a non-existing file with vol-key in logical/iscsi pool
Summary: Error message is not correct when "vol-upload" a non-existing file with vol-k...
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: yisun
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-27 10:42 UTC by Fangge Jin
Modified: 2018-10-30 09:52 UTC (History)
5 users (show)

Fixed In Version: libvirt-4.3.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 09:52:20 UTC
Target Upstream Version:


Attachments (Terms of Use)


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

Description Fangge Jin 2017-12-27 10:42:02 UTC
Description of problem:
Error message is not correct when "vol-upload" a non-existing file with vol-key in logical/iscsi pool

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

How reproducible:
100%

Steps to Reproduce:
1. Prepare a volume in iscsi(or logical) pool
# virsh vol-list iscsi
Name Path 
------------------------------------------------------------------------------
unit:0:0:0 /dev/disk/by-path/ip-10.66.70.106:3260-iscsi-iqn.1994-05.com.redhat:test-target-lun-0

# virsh vol-key --pool iscsi --vol unit:0:0:0
3600140590027d1f90474ffb826f03f72

2. Upload a non-existing file to the volume with volume key:
# virsh vol-upload --pool iscsi --vol 3600140590027d1f90474ffb826f03f72 /tmp/upload-file-aaaaaaaaaaaaaaaaaaaaaaa
error: cannot read /tmp/upload-file-aaaaaaaaaaaaaaaaaaaaaaa
error: Storage volume not found: no storage vol with matching name '3600140590027d1f90474ffb826f03f72'

Actual results:
Upload fails, and print error message:
error: cannot read /tmp/upload-file-aaaaaaaaaaaaaaaaaaaaaaa
error: Storage volume not found: no storage vol with matching name '3600140590027d1f90474ffb826f03f72'

Expected results:
Upload fails, and print error message: "error: cannot read /tmp/upload-file-aaaaaaaaaaaaaaaaaaaaaaa"


Additional info:

Comment 2 John Ferlan 2018-04-16 15:56:46 UTC
Patch posted upstream:

https://www.redhat.com/archives/libvir-list/2018-April/msg01353.html

Comment 3 John Ferlan 2018-04-17 15:22:54 UTC
Patch pushed:

$ git describe 0d6e8341031ab1b23b89c15574b2b0a08ef3c3b1 
v4.2.0-259-g0d6e834103
$

Comment 5 yisun 2018-06-13 08:35:50 UTC
test with libvirt-4.3.0-1.virtcov.el7.x86_64 and PASSED

Steps:
1. having a iscsi/logical pool
# virsh pool-dumpxml iscsi
<pool type='iscsi'>
  <name>iscsi</name>
  <uuid>978f4cd7-e782-4cec-8687-5f67b13cb7ac</uuid>
  <capacity unit='bytes'>2097152000</capacity>
  <allocation unit='bytes'>2097152000</allocation>
  <available unit='bytes'>0</available>
  <source>
    <host name='127.0.0.1'/>
    <device path='iqn.2016-03.com.virttest:logical-pool.target'/>
  </source>
  <target>
    <path>/dev/disk/by-path</path>
  </target>
</pool>


2. having existing vol
# virsh vol-list iscsi
 Name                 Path                                    
------------------------------------------------------------------------------
 unit:0:0:0           /dev/disk/by-path/ip-127.0.0.1:3260-iscsi-iqn.2016-03.com.virttest:logical-pool.target-lun-0

# virsh vol-key --pool iscsi --vol unit:0:0:0
36001405a6218f03f3914101b114b8693

3. do the vol-upload
# virsh vol-upload --pool iscsi --vol 36001405a6218f03f3914101b114b8693 /tmp/upload-file-aaaaaaaaaaaaaaaaaaaaaaa
error: cannot read /tmp/upload-file-aaaaaaaaaaaaaaaaaaaaaaa

The error message is clear now.

Comment 7 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.