Don't treat runtime error as shim error
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
5617360b3a
commit
0969765fad
2 changed files with 13 additions and 0 deletions
|
@ -31,6 +31,13 @@ func main() {
|
|||
logrus.SetOutput(f)
|
||||
logrus.SetFormatter(&logrus.JSONFormatter{})
|
||||
if err := start(); err != nil {
|
||||
// this means that the runtime failed starting the container and will have the
|
||||
// proper error messages in the runtime log so we should to treat this as a
|
||||
// shim failure because the sim executed properly
|
||||
if err == errRuntime {
|
||||
f.Close()
|
||||
return
|
||||
}
|
||||
// log the error instead of writing to stderr because the shim will have
|
||||
// /dev/null as it's stdio because it is supposed to be reparented to system
|
||||
// init and will not have anyone to read from it
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue