nbd
nbd copied to clipboard
NBD server unreliable when in debug mode (-d)
In runit all services are started in foreground mode, so nbd-server is started as nbd-server -d
.
Generally, network booting a client works fine unless the client machine is force-reset/shutoff at least once. Any subsequent boot attempt will stop and hang at this line with the cursor blinking:
Negotiation: _
The issue is 100% reproducible and occurs exclusively when nbd-server is run with -d
.
NBD version is 3.24 with the package built as per https://github.com/void-linux/void-packages/blob/master/srcpkgs/nbd/template.
nbd-server will fork on two occasions: once to detach from the foreground, and once to separate the serving process for a client from the master process.
The -d
parameter will disable both cases. You clearly expect it to only disable the first, which is not a use case that the -d
parameter was meant for.
A patch for adding the behavior you seek is welcome.