Don't parse stderr as json when calling "state" command.

Some oci runtimes may used stderr for logging.  Cri-o should not try to
parse this output as json when calling the "state" command.

Signed-off-by: Nicolas Lacasse <nlacasse@google.com>
This commit is contained in:
Nicolas Lacasse 2017-12-06 09:35:20 -08:00
parent 85f303f3ff
commit 1138af9e59
1 changed files with 1 additions and 1 deletions

View File

@ -669,7 +669,7 @@ func (r *Runtime) SetStartFailed(c *Container, err error) {
func (r *Runtime) UpdateStatus(c *Container) error {
c.opLock.Lock()
defer c.opLock.Unlock()
out, err := exec.Command(r.Path(c), "state", c.id).CombinedOutput()
out, err := exec.Command(r.Path(c), "state", c.id).Output()
if err != nil {
// there are many code paths that could lead to have a bad state in the
// underlying runtime.