1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-25 01:06:39 +00:00
restic/internal/backend
Jakob Unterwurzacher dd3b9910ee sftp: persist "ssh command exited" error
If our ssh process has died, not only the next, but all subsequent
calls to clientError() should indicate the error.

restic output when the ssh process is killed with "kill -9":

  Save(<data/afb68adbf9>) returned error, retrying after 253.661803ms: Write: failed to send packet header: write |1: file already closed
  Save(<data/afb68adbf9>) returned error, retrying after 580.752212ms: ssh command exited: signal: killed
  Save(<data/afb68adbf9>) returned error, retrying after 790.150468ms: ssh command exited: signal: killed
  Save(<data/afb68adbf9>) returned error, retrying after 1.769595051s: ssh command exited: signal: killed
  [...]
  error in cleanup handler: ssh command exited: signal: killed

Before this patch:

  Save(<data/de698d934f>) returned error, retrying after 252.84163ms: Write: failed to send packet header: write |1: file already closed
  Save(<data/de698d934f>) returned error, retrying after 660.236963ms: OpenFile: failed to send packet header: write |1: file already closed
  Save(<data/de698d934f>) returned error, retrying after 568.049909ms: OpenFile: failed to send packet header: write |1: file already closed
  Save(<data/de698d934f>) returned error, retrying after 2.428813824s: OpenFile: failed to send packet header: write |1: file already closed
  [...]
  error in cleanup handler: failed to send packet header: write |1: file already closed
2018-05-30 19:28:14 +02:00
..
azure backend: Improve Save() 2018-03-03 15:49:44 +01:00
b2 b2: Remove extra error check 2018-05-26 10:12:30 +02:00
gs Automatically load Google auth 2018-03-11 17:11:25 +00:00
local local/sftp: Handling non-existing dirs in List() 2018-04-10 21:35:30 +02:00
location Add rclone backend 2018-04-01 10:16:31 +02:00
mem backend: Improve Save() 2018-03-03 15:49:44 +01:00
rclone rclone: Respect bandwith limits 2018-05-22 20:48:17 +02:00
rest backend/rest: Ensure base URL ends with slash 2018-04-01 10:18:38 +02:00
s3 S3: rearrange credentials chain to be standard 2018-05-16 16:49:33 -07:00
sftp sftp: persist "ssh command exited" error 2018-05-30 19:28:14 +02:00
swift backend: Improve Save() 2018-03-03 15:49:44 +01:00
test backend/tests: Drain reader before returning error 2018-04-01 10:16:31 +02:00
testdata
backend_error.go backend: Improve Save() 2018-03-03 15:49:44 +01:00
backend_retry.go Update vendored library github.com/cenkalti/backoff 2018-03-30 11:45:27 +02:00
backend_retry_test.go backend: Improve Save() 2018-03-03 15:49:44 +01:00
doc.go
foreground_solaris.go Move backend/sftp.StartForeground to backend/ 2018-04-01 10:16:31 +02:00
foreground_unix.go Move backend/sftp.StartForeground to backend/ 2018-04-01 10:16:31 +02:00
foreground_windows.go Add rclone backend 2018-04-01 10:16:31 +02:00
http_transport.go http backend: Parse the correct argument when loading --tls-client-cert 2018-04-30 15:21:09 -07:00
layout.go
layout_default.go
layout_rest.go
layout_s3legacy.go
layout_test.go
paths.go
semaphore.go
shell_split.go Refactor SplitShellStrings 2018-04-01 10:16:31 +02:00
shell_split_test.go Refactor SplitShellStrings 2018-04-01 10:16:31 +02:00
utils.go
utils_test.go backend: Improve Save() 2018-03-03 15:49:44 +01:00