mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Error string match: do not match command path
Whether or not the command path is in the error message is a an
implementation detail.
For example, on Windows the only reason this ever matched was because it
dumped the entire container config into the error message, but this had
nothing to do with the actual error.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 225e046d9d
)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
parent
404ede5737
commit
12b03bcb27
1 changed files with 4 additions and 5 deletions
|
@ -141,11 +141,10 @@ func translateContainerdStartErr(cmd string, setExitCode func(int), err error) e
|
||||||
// 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 container cmd not found/does not exist)
|
// set to 127 for container cmd not found/does not exist)
|
||||||
if contains(errDesc, cmd) &&
|
if contains(errDesc, "executable file not found") ||
|
||||||
(contains(errDesc, "executable file not found") ||
|
|
||||||
contains(errDesc, "no such file or directory") ||
|
contains(errDesc, "no such file or directory") ||
|
||||||
contains(errDesc, "system cannot find the file specified") ||
|
contains(errDesc, "system cannot find the file specified") ||
|
||||||
contains(errDesc, "failed to run runc create/exec call")) {
|
contains(errDesc, "failed to run runc create/exec call") {
|
||||||
setExitCode(127)
|
setExitCode(127)
|
||||||
retErr = startInvalidConfigError(errDesc)
|
retErr = startInvalidConfigError(errDesc)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue