Improve their reliability by allowing socat to reuse an address,
preventing errors if migrations are executed with too narrow a
timespan.
Improve performance by choosing a better blocksize than the default 8k.
Signed-off-by: Hrvoje Ribicic <riba@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
# And try and kill a previous daemon
XenHypervisor._KillMigrationDaemon(instance)
- listening_arg = "TCP-LISTEN:%d,bind=%s" % (port, target)
- socat_pid = utils.StartDaemon(["socat", listening_arg,
+ listening_arg = "TCP-LISTEN:%d,bind=%s,reuseaddr" % (port, target)
+ socat_pid = utils.StartDaemon(["socat", "-b524288", listening_arg,
"SYSTEM:'xl migrate-receive'"],
pidfile=pidfile)
xenKernel = AutoConf.xenKernel
xlSocatCmd :: String
-xlSocatCmd = "socat - tcp:%s:%d #"
+xlSocatCmd = "socat -b524288 - TCP:%s:%d #"
xlMigrationPidfile :: String
xlMigrationPidfile = "socat.pid"