Merge pull request #17817 from Microsoft/jjh/contained

Typo s/contained/container
This commit is contained in:
Vincent Demeester 2015-11-09 07:55:44 +01:00
commit c13ca529d3
2 changed files with 9 additions and 9 deletions

View File

@ -167,7 +167,7 @@ func (m *containerMonitor) Start() error {
if exitStatus, err = m.supervisor.Run(m.container, pipes, m.callback); err != nil { 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 // if we receive an internal error from the initial start of a container then lets
// return it instead of entering the restart loop // 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") || if strings.Contains(err.Error(), "executable file not found") ||
strings.Contains(err.Error(), "no such file or directory") || strings.Contains(err.Error(), "no such file or directory") ||
strings.Contains(err.Error(), "system cannot find the file specified") { strings.Contains(err.Error(), "system cannot find the file specified") {
@ -177,7 +177,7 @@ func (m *containerMonitor) Start() error {
return derr.ErrorCodeCmdNotFound 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 strings.Contains(err.Error(), syscall.EACCES.Error()) {
if m.container.RestartCount == 0 { if m.container.RestartCount == 0 {
m.container.ExitCode = 126 m.container.ExitCode = 126

View File

@ -922,25 +922,25 @@ var (
HTTPStatusCode: http.StatusInternalServerError, HTTPStatusCode: http.StatusInternalServerError,
}) })
// ErrorCodeCmdNotFound is generated when contained cmd can't start, // ErrorCodeCmdNotFound is generated when container cmd can't start,
// contained command not found error, exit code 127 // container command not found error, exit code 127
ErrorCodeCmdNotFound = errcode.Register(errGroup, errcode.ErrorDescriptor{ ErrorCodeCmdNotFound = errcode.Register(errGroup, errcode.ErrorDescriptor{
Value: "CMDNOTFOUND", 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", Description: "Command could not be found, command does not exist",
HTTPStatusCode: http.StatusInternalServerError, HTTPStatusCode: http.StatusInternalServerError,
}) })
// ErrorCodeCmdCouldNotBeInvoked is generated when contained cmd can't start, // ErrorCodeCmdCouldNotBeInvoked is generated when container cmd can't start,
// contained command permission denied error, exit code 126 // container command permission denied error, exit code 126
ErrorCodeCmdCouldNotBeInvoked = errcode.Register(errGroup, errcode.ErrorDescriptor{ ErrorCodeCmdCouldNotBeInvoked = errcode.Register(errGroup, errcode.ErrorDescriptor{
Value: "CMDCOULDNOTBEINVOKED", Value: "CMDCOULDNOTBEINVOKED",
Message: "Contained command could not be invoked.", Message: "Container command could not be invoked.",
Description: "Permission denied, cannot invoke command", Description: "Permission denied, cannot invoke command",
HTTPStatusCode: http.StatusInternalServerError, 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 // for any reason other than above 2 errors
ErrorCodeCantStart = errcode.Register(errGroup, errcode.ErrorDescriptor{ ErrorCodeCantStart = errcode.Register(errGroup, errcode.ErrorDescriptor{
Value: "CANTSTART", Value: "CANTSTART",