Bug 1696211 - 'qemu-img map' for an image file over NBD fails
Summary: 'qemu-img map' for an image file over NBD fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: qemu-kvm
Version: 8.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.0
Assignee: Eric Blake
QA Contact: Tingting Mao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-04 10:54 UTC by Tingting Mao
Modified: 2019-11-06 07:14 UTC (History)
10 users (show)

Fixed In Version: qemu-kvm-4.1.0-1.module+el8.1.0+3966+4a23dca1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-06 07:14:08 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:3723 0 None None None 2019-11-06 07:14:36 UTC

Description Tingting Mao 2019-04-04 10:54:27 UTC
Description of problem:
'qemu-img map' for a image image over NBD fails.


Version-Release number of selected component (if applicable):
qemu-kvm-3.1.0-20.module+el8+2904+e658c755
kernel-4.18.0-80.el8


How reproducible:
2/2


Steps to Reproduce:

1.Create a image file and export it by NBD
# qemu-img create -f raw test.img 512M 
Formatting 'test.img', fmt=raw size=536870912
# qemu-nbd -f raw -p 9000 test.img -t

2. Dump the metadata of the image
# qemu-img map nbd:localhost:9000


Actual results:
Client:
# qemu-img map nbd:localhost:9000
Offset          Length          Mapped to       File
qemu-img: File contains external, encrypted or compressed clusters.

Server:
# qemu-nbd -f raw -p 9000 test.img -t
Disconnect client, due to: Unexpected end-of-file before all bytes were read


Expected results:
Dump the metadata successfully, and there is no error info from the server.


Additional info:

Comment 4 Tingting Mao 2019-08-19 06:52:18 UTC
Tried to verify this bug as below:


Tested with:
qemu-kvm-4.1.0-1.module+el8.1.0+3966+4a23dca1
kernel-4.18.0-134.el8


Steps:
In Server:
# qemu-img create -f raw test.img 512M

# qemu-nbd -f raw -p 9000 test.img -t

In client:
Map with default/human
# qemu-img map nbd:localhost:9000
Offset          Length          Mapped to       File

Map with json
# qemu-img map nbd:localhost:9000 --output=json
[{ "start": 0, "length": 536870912, "depth": 0, "zero": true, "data": true, "offset": 0}]


Results:
In server, there is no error info anymore.
# qemu-nbd -f raw -p 9000 test.img -t

In client, like above.

Comment 6 errata-xmlrpc 2019-11-06 07:14:08 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/RHBA-2019:3723


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