mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-14 22:24:14 +00:00
Merge pull request #4271 from r4f4/runtime-err-check-fix
runtime: do not check for EOF error in console watcher
This commit is contained in:
commit
c88a48be21
@ -1037,15 +1037,13 @@ func (cw *consoleWatcher) start(s *Sandbox) (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if err := scanner.Err(); err != nil {
|
if err := scanner.Err(); err != nil {
|
||||||
if err == io.EOF {
|
s.Logger().WithError(err).WithFields(logrus.Fields{
|
||||||
s.Logger().Info("console watcher quits")
|
"console-protocol": cw.proto,
|
||||||
} else {
|
"console-url": cw.consoleURL,
|
||||||
s.Logger().WithError(err).WithFields(logrus.Fields{
|
"sandbox": s.id,
|
||||||
"console-protocol": cw.proto,
|
}).Error("Failed to read guest console logs")
|
||||||
"console-url": cw.consoleURL,
|
} else { // The error is `nil` in case of io.EOF
|
||||||
"sandbox": s.id,
|
s.Logger().Info("console watcher quits")
|
||||||
}).Error("Failed to read guest console logs")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user