nbd-client 3.7 connects read-only to newer nbd servers
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>
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:/
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.
> I am a committer on the nbd project
Marking Triaged on that basis. Thank you for looking after this in Ubuntu!