Public bug reported:

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://www.mail-archive.com/nbd-general@lists.sourceforge.net/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.

** Affects: nbd (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1578185

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nbd/+bug/1578185/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to