Skip to content

Commit

Permalink
Typo s/contained/container
Browse files Browse the repository at this point in the history
Signed-off-by: John Howard <[email protected]>
  • Loading branch information
John Howard committed Nov 9, 2015
1 parent e357be4 commit 2ff6891
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions daemon/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (m *containerMonitor) Start() error {
if exitStatus, err = m.supervisor.Run(m.container, pipes, m.callback); err != nil {
// if we receive an internal error from the initial start of a container then lets
// return it instead of entering the restart loop
// set to 127 for contained cmd not found/does not exist)
// set to 127 for container cmd not found/does not exist)
if strings.Contains(err.Error(), "executable file not found") ||
strings.Contains(err.Error(), "no such file or directory") ||
strings.Contains(err.Error(), "system cannot find the file specified") {
Expand All @@ -177,7 +177,7 @@ func (m *containerMonitor) Start() error {
return derr.ErrorCodeCmdNotFound
}
}
// set to 126 for contained cmd can't be invoked errors
// set to 126 for container cmd can't be invoked errors
if strings.Contains(err.Error(), syscall.EACCES.Error()) {
if m.container.RestartCount == 0 {
m.container.ExitCode = 126
Expand Down
14 changes: 7 additions & 7 deletions errors/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -922,25 +922,25 @@ var (
HTTPStatusCode: http.StatusInternalServerError,
})

// ErrorCodeCmdNotFound is generated when contained cmd can't start,
// contained command not found error, exit code 127
// ErrorCodeCmdNotFound is generated when container cmd can't start,
// container command not found error, exit code 127
ErrorCodeCmdNotFound = errcode.Register(errGroup, errcode.ErrorDescriptor{
Value: "CMDNOTFOUND",
Message: "Contained command not found or does not exist.",
Message: "Container command not found or does not exist.",
Description: "Command could not be found, command does not exist",
HTTPStatusCode: http.StatusInternalServerError,
})

// ErrorCodeCmdCouldNotBeInvoked is generated when contained cmd can't start,
// contained command permission denied error, exit code 126
// ErrorCodeCmdCouldNotBeInvoked is generated when container cmd can't start,
// container command permission denied error, exit code 126
ErrorCodeCmdCouldNotBeInvoked = errcode.Register(errGroup, errcode.ErrorDescriptor{
Value: "CMDCOULDNOTBEINVOKED",
Message: "Contained command could not be invoked.",
Message: "Container command could not be invoked.",
Description: "Permission denied, cannot invoke command",
HTTPStatusCode: http.StatusInternalServerError,
})

// ErrorCodeCantStart is generated when contained cmd can't start,
// ErrorCodeCantStart is generated when container cmd can't start,
// for any reason other than above 2 errors
ErrorCodeCantStart = errcode.Register(errGroup, errcode.ErrorDescriptor{
Value: "CANTSTART",
Expand Down

0 comments on commit 2ff6891

Please sign in to comment.