job pull + source: fix broken connection teardown
Issue #56 shows zombie SSH processes. We fix this by actually Close()ing the RWC in job pull. If this fixes #56 it also fixes #6 --- it's the same issue. Additionally, debugging around this revealed another issue: just Close()ing the sshbytestream in job source will apparently outpace the normal data stream of stdin and stdout (URG or PUSH flags?). leading to ugly errors in the logs. With proper TCP connections, we would simply set the connection to linger and close it, letting the kernel handle the final timeout. Meh. refs #56 refs #6
This commit is contained in:
@@ -139,10 +139,10 @@ func (j *PullJob) doRun(ctx context.Context) {
|
||||
j.task.Enter("pull")
|
||||
puller := Puller{j.task, client, j.Mapping, j.InitialReplPolicy}
|
||||
puller.Pull()
|
||||
closeRPCWithTimeout(j.task, client, time.Second*1, "")
|
||||
rwc.Close()
|
||||
j.task.Finish()
|
||||
|
||||
closeRPCWithTimeout(j.task, client, time.Second*10, "")
|
||||
|
||||
j.task.Enter("prune")
|
||||
pruner, err := j.Pruner(j.task, PrunePolicySideDefault, false)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user