Closed Ferroin closed 5 years ago
[generic]
max_threads = 16
unixsocket = /virt/swap/socket
That should say unixsock
, not unixsocket
. Currently, nbd-server does not produce errors or warnings for unknown configuration values; the way it's written, it doesn't even see them (this should probably be revisited, but ENOTIME right now). Closing since that's likely to be the reason; if not, feel free to reopen.
A quick look at the code in nbd-server.c seems to indicate that TCP servers get started unconditionally
Patches welcome ;-)
That should say unixsock, not unixsocket. Currently, nbd-server does not produce errors or warnings for unknown configuration values; the way it's written, it doesn't even see them (this should probably be revisited, but ENOTIME right now). Closing since that's likely to be the reason; if not, feel free to reopen.
Doh! You're right, I misread the documentation (and was a bit confused by the lack of an error message). Sorry about the noise.
Originally discovered using nbd-server 3.18 on Gentoo, tested all the way back to 3.15.3.
Put quite simply,
nbd-server
appears to be ignoring the presence of aunixsock
config option in the[general]
section, and just serves over TCP on all interfaces instead.Sample config that's not working:
A quick look at the code in
nbd-server.c
seems to indicate that TCP servers get started unconditionally (I see exactly zero code paths whereby you can get toopen_unix()
without first having calledopen_nodern()
successfully), which not only strikes me as wrong (as a general rule, people serve something over a unix socket because they don't want it served over the network), but seems like it's probably related to this.