nbd-client 3.7 connects read-only to newer nbd servers

Bug #1578185 reported by Alex Bligh
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nbd (Ubuntu)
Fix Released
Medium
Unassigned
Trusty
Triaged
Medium
Unassigned

Bug Description

nbd-client 3.7 (shipped with 14.04) connects read-only to newer nbd servers (3.9+, as well as gonbdserver and - probably - modern qemu).

The problem is described here:
   https://<email address hidden>/msg03878.html

In essence nbd-client pre 3.10 attempts to merge the global server flags received from the server with the transmission flags received from the server, before passing them to the kernel. This action is in fact pointless as the kernel does not need to know the global server flags as they relate only to negotiation. The idea appears to have been (in oldstyle negotiation) to put the in the top 16 bits, however they are in fact merged into the lower 16 bits. This means any server that supports NBD_FLAG_NO_ZEROES (i.e. nbd-server 3.9 or later, gonbdserver, modern Qemu I believe) will have the flag saying it supports that falsely transmitted to the kernel as bit 1, which is in fact the read only flag.

In practice this means (I believe) that 14.04's NBD client will not connect to 16.04's NBD server, or other NBD servers. For instance see this bug report agaist gonbdserver:
    https://github.com/abligh/gonbdserver/issues/4

Whilst it is possible that every server could be changed to work around this buggy client behaviour (as I did for gonbdserver) it would be better to fix the issue in 14.04, especially as passing undefined flags to the kernel is probably not a great idea. Obviously this will require an SRU.

I am a committer on the nbd project and intend to provide a patch for this. This bug is merely to track progress in Ubuntu.

Revision history for this message
Robie Basak (racb) wrote :

> I am a committer on the nbd project

Marking Triaged on that basis. Thank you for looking after this in Ubuntu!

Changed in nbd (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Changed in nbd (Ubuntu Trusty):
status: New → Triaged
importance: Undecided → Medium
Changed in nbd (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Robie Basak (racb) wrote :

<alexbligh1> rbasak, thx - if you could tell me how to mark it as 14.04 only that would be great.

Revision history for this message
Robie Basak (racb) wrote :

<alexbligh1> rbasak, yes it was fixed in wily when 3.10 was imported. Thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.