nbd icon indicating copy to clipboard operation
nbd copied to clipboard

Lame-duck mode is not yet implemented

Open Merovius opened this issue 7 years ago • 0 comments

When the server is shutting down (by a cancelled context) it shouldn't just abort handling requests, but instead reply to them with ESHUTDOWN or NBD_REP_ERR_SHUTDOWN, until the client disconnects. This is unfortunate in that it means cancellation isn't immediate - if the client refuses to disconnect, Serve would block forever. Maybe we need a secondary cancellation signal for that.

Likewise, if the client receives an ESHUTDOWN or NBD_REP_ERR_SHUTDOWN response at any point, it should send an Abort/Disconnect.

Relevant spec values:

  • ESHUTDOWN
  • NBD_REP_ERR_SHUTDOWN

Merovius avatar Nov 19 '18 22:11 Merovius