add error type for check running
parent
c8b6ceaffc
commit
736f5219e0
|
@ -26,3 +26,6 @@ var ErrWindowsContainers = FailFastError(errors.New("docker container type is wi
|
||||||
|
|
||||||
// ErrCPUCountLimit is thrown when docker daemon doesn't have enough CPUs for the requested container
|
// ErrCPUCountLimit is thrown when docker daemon doesn't have enough CPUs for the requested container
|
||||||
var ErrCPUCountLimit = FailFastError(errors.New("not enough CPUs is available for container"))
|
var ErrCPUCountLimit = FailFastError(errors.New("not enough CPUs is available for container"))
|
||||||
|
|
||||||
|
// ErrNotRunningAfterCreate is thrown when container is created without error but it exists and it's status is not running
|
||||||
|
var ErrNotRunningAfterCreate = errors.New("container status is not running after creation")
|
||||||
|
|
|
@ -218,7 +218,7 @@ func CreateContainerNode(p CreateParams) error {
|
||||||
|
|
||||||
// retry up to up 13 seconds to make sure the created container status is running.
|
// retry up to up 13 seconds to make sure the created container status is running.
|
||||||
if err := retry.Expo(checkRunning, 13*time.Millisecond, time.Second*13); err != nil {
|
if err := retry.Expo(checkRunning, 13*time.Millisecond, time.Second*13); err != nil {
|
||||||
return errors.Wrapf(err, "check container %q running", p.Name)
|
return errors.Wrapf(ErrNotRunningAfterCreate, "container name %q", p.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue