Allow retry of 500 API errors to be handled by restart policies
This commit is contained in:
parent
a26b80f382
commit
ae230395ba
|
@ -666,7 +666,7 @@ func (d *DockerDriver) Start(ctx *ExecContext, task *structs.Task) (*StartRespon
|
|||
if err := d.startContainer(container); err != nil {
|
||||
d.logger.Printf("[ERR] driver.docker: failed to start container %s: %s", container.ID, err)
|
||||
pluginClient.Kill()
|
||||
return nil, fmt.Errorf("Failed to start container %s: %s", container.ID, err)
|
||||
return nil, structs.NewRecoverableError(fmt.Errorf("Failed to start container %s: %s", container.ID, err), structs.IsRecoverable(err))
|
||||
}
|
||||
|
||||
// InspectContainer to get all of the container metadata as
|
||||
|
@ -1384,6 +1384,7 @@ START:
|
|||
time.Sleep(1 * time.Second)
|
||||
goto START
|
||||
}
|
||||
return structs.NewRecoverableError(startErr, true)
|
||||
}
|
||||
|
||||
return recoverableErrTimeouts(startErr)
|
||||
|
|
Loading…
Reference in New Issue