Skip to content

Commit

Permalink
More recoverable errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dadgar committed Nov 2, 2016
1 parent 875b8c8 commit 6a0999c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/driver/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,11 @@ func (d *DockerDriver) Start(ctx *ExecContext, task *structs.Task) (DriverHandle
// We failed to create the container for some other reason.
d.logger.Printf("[ERR] driver.docker: failed to create container from image %s: %s", image, err)
pluginClient.Kill()
return nil, fmt.Errorf("Failed to create container from image %s: %s", image, err)
e := fmt.Errorf("Failed to create container from image %s: %s", image, err)
if strings.Contains(err.Error(), "Client.Timeout exceeded while awaiting headers") {
return nil, structs.NewRecoverableError(e, true)
}
return nil, e
}
}
d.logger.Printf("[INFO] driver.docker: created container %s", container.ID)
Expand Down

0 comments on commit 6a0999c

Please sign in to comment.