From 1138af9e59309bcd2b9f6cd4b3a530239f594b04 Mon Sep 17 00:00:00 2001 From: Nicolas Lacasse Date: Wed, 6 Dec 2017 09:35:20 -0800 Subject: [PATCH] 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 --- oci/oci.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oci/oci.go b/oci/oci.go index e9ca02ae..f2bf3a1b 100644 --- a/oci/oci.go +++ b/oci/oci.go @@ -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.