Bug 1297100

Summary: nbdkit doesn't support new NBD protocol
Product: [Fedora] Fedora Reporter: Matt Hirsch <matthew.hirsch>
Component: nbdkitAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: matthew.hirsch, rjones
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-11 18:47:51 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:
Attachments:
Description Flags
0001-Add-support-for-newstyle-NBD-protocol-RHBZ-1297100.patch none

Description Matt Hirsch 2016-01-09 06:53:55 UTC
Description of problem:
I can't connect to an nbd server using the xz plugin in Fedora 23.

For example:
nbdkit --no-fork -i localhost xz file=disk.img.xz

And on another terminal:
nbd-client -N img localhost 10809 /dev/nbd0 -nofork

I get the error:
Negotiation: .Error: It looks like you're trying to connect to an oldstyle server. This is no longer supported since nbd 3.10.

Version-Release number of selected component (if applicable):
nbdkit-1.1.10-2.fc23.x86_64
nbdkit-plugin-xz-1.1.10-2.fc23.x86_64
nbd-3.11-2.fc23.x86_64

Comment 1 Richard W.M. Jones 2016-01-09 09:15:02 UTC
Indeed - nbdkit only supports the original NBD protocol (same
as qemu-nbd).  Patches welcome to fix this.

Comment 2 Richard W.M. Jones 2016-01-11 17:31:47 UTC
Created attachment 1113640 [details]
0001-Add-support-for-newstyle-NBD-protocol-RHBZ-1297100.patch

Please try the following patch:

https://www.redhat.com/archives/libguestfs/2016-January/msg00026.html

(The same patch is also attached).

Note that you must add '-n' on the command line to get newstyle
protocol support.

Comment 3 Richard W.M. Jones 2016-01-11 18:47:51 UTC
I did a bit more testing and pushed the following commit upstream:

https://github.com/libguestfs/nbdkit/commit/f93807114634d58ca2ef0d64f7637ebd87e48a50

Your testing is still welcomed, but for now I am closing this bug as
being fixed upstream, and in Fedora Rawhide soon.

Comment 4 Matt Hirsch 2016-01-11 18:58:44 UTC
Thanks very much! I'll report back with a test result as soon as I get a chance.

Comment 5 Richard W.M. Jones 2016-01-11 19:08:39 UTC
Rawhide build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=12501791

Comment 6 Richard W.M. Jones 2016-01-11 20:56:05 UTC
Try this build:

http://koji.fedoraproject.org/koji/taskinfo?taskID=12502874

Comment 7 Matt Hirsch 2016-01-17 07:13:42 UTC
I tested this, it works great for my disk image. Thanks again for doing this!