Skip to content

Commit

Permalink
Merge pull request kubernetes-csi#54 from sbezverk/issue_53
Browse files Browse the repository at this point in the history
Change in isFinalError func Issue 53
  • Loading branch information
jsafrane authored Jun 7, 2018
2 parents 0e67f66 + 07a563f commit f4b0789
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/connection/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,14 @@ func isFinalError(err error) bool {
if !ok {
// This is not gRPC error. The operation must have failed before gRPC
// method was called, otherwise we would get gRPC error.
return true
return false
}
switch st.Code() {
case codes.Canceled, // gRPC: Client Application cancelled the request
codes.DeadlineExceeded, // gRPC: Timeout
codes.Unavailable, // gRPC: Server shutting down, TCP connection broken - previous Attach() or Detach() may be still in progress.
codes.ResourceExhausted, // gRPC: Server temporarily out of resources - previous Attach() or Detach() may be still in progress.
codes.FailedPrecondition: // CSI: Operation pending for volume
codes.DeadlineExceeded, // gRPC: Timeout
codes.Unavailable, // gRPC: Server shutting down, TCP connection broken - previous Attach() or Detach() may be still in progress.
codes.ResourceExhausted, // gRPC: Server temporarily out of resources - previous Attach() or Detach() may be still in progress.
codes.Aborted: // CSI: Operation pending for volume
return false
}
// All other errors mean that the operation (attach/detach) either did not
Expand Down

0 comments on commit f4b0789

Please sign in to comment.