Skip to content

Commit

Permalink
add error type for check running
Browse files Browse the repository at this point in the history
  • Loading branch information
medyagh committed Jun 17, 2020
1 parent c8b6cea commit 736f521
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pkg/drivers/kic/oci/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
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")
2 changes: 1 addition & 1 deletion pkg/drivers/kic/oci/oci.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func CreateContainerNode(p CreateParams) error {

// 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 {
return errors.Wrapf(err, "check container %q running", p.Name)
return errors.Wrapf(ErrNotRunningAfterCreate, "container name %q", p.Name)
}

return nil
Expand Down

0 comments on commit 736f521

Please sign in to comment.