summaryrefslogtreecommitdiff
path: root/libpod/oci_conmon_linux.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2020-03-09 09:48:47 -0400
committerMatthew Heon <matthew.heon@pm.me>2020-03-09 09:50:40 -0400
commitffce869daa6c4956bc1509b7b10726a266b74741 (patch)
tree617093cb3f3b533bc9957f6dfe3b8fe5a7e40c7c /libpod/oci_conmon_linux.go
parent6be87b21862888e88daa2bc502ea84123d64850b (diff)
downloadpodman-ffce869daa6c4956bc1509b7b10726a266b74741.tar.gz
podman-ffce869daa6c4956bc1509b7b10726a266b74741.tar.bz2
podman-ffce869daa6c4956bc1509b7b10726a266b74741.zip
Revert "Exec: use ErrorConmonRead"
This reverts commit d3d97a25e8c87cf741b2e24ac01ef84962137106. This does not resolve the issues we expected it would, and has some unexpected side effects with the upcoming exec rework. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/oci_conmon_linux.go')
-rw-r--r--libpod/oci_conmon_linux.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go
index f260e3a39..8da6db09f 100644
--- a/libpod/oci_conmon_linux.go
+++ b/libpod/oci_conmon_linux.go
@@ -1557,7 +1557,7 @@ func readConmonPipeData(pipe *os.File, ociLog string) DataAndErr {
ch <- syncStruct{si: si}
}()
- data := define.ErrorConmonRead
+ data := -1
select {
case ss := <-ch:
if ss.err != nil {
@@ -1567,14 +1567,14 @@ func readConmonPipeData(pipe *os.File, ociLog string) DataAndErr {
var ociErr ociError
if err := json.Unmarshal(ociLogData, &ociErr); err == nil {
return DataAndErr{
- data: data,
+ data: -1,
err: getOCIRuntimeError(ociErr.Msg),
}
}
}
}
return DataAndErr{
- data: data,
+ data: -1,
err: errors.Wrapf(ss.err, "container create failed (no logs from conmon)"),
}
}
@@ -1607,7 +1607,7 @@ func readConmonPipeData(pipe *os.File, ociLog string) DataAndErr {
data = ss.si.Data
case <-time.After(define.ContainerCreateTimeout):
return DataAndErr{
- data: data,
+ data: -1,
err: errors.Wrapf(define.ErrInternal, "container creation timeout"),
}
}