Retry failed rebind attempts
When we receive a migration, if rebinding to the new listen address and port fails for a reason which might be fixable, rather than killing the server we retry once a second. Also in this patch: non-overlapping log messages and a fix for the client going away halfway through a sendfile loop.
This commit is contained in:
17
tests/acceptance/fakes/source/close_mid_read.rb
Executable file
17
tests/acceptance/fakes/source/close_mid_read.rb
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
# Connect, but get the protocol wrong: don't read the hello, so we
|
||||
# close and break the sendfile.
|
||||
|
||||
require 'flexnbd/fake_source'
|
||||
include FlexNBD
|
||||
|
||||
addr, port, srv_pid, newaddr, newport = *ARGV
|
||||
|
||||
client = FakeSource.new( addr, port, "Timed out connecting" )
|
||||
client.write_read_request( 0, 8 )
|
||||
client.read_raw( 4 )
|
||||
client.close
|
||||
|
||||
|
||||
exit(0)
|
Reference in New Issue
Block a user