containerd / go-runc

runc bindings for Go
Apache License 2.0
161 stars 71 forks source link

Fix Method of judging command execution failure #52

Closed Ace-Tang closed 5 years ago

Ace-Tang commented 5 years ago

should judge restore and run command execution failure depend both on error and status Monitor.Wait() return. Since Monitor.Wait() always return nil as long as command execute.

Signed-off-by: Ace-Tang aceapril@126.com

I only test it with pouch, before the patch

failed to retrieve OCI runtime container pid: open /home/t4/pouch/containerd/state/io.containerd.runtime.v1.linux/default/3f9dbd58131ca9d9151a0220e1d8ca833c26f750bf055124fc38f09d4de27a06/init.pid: no such file or directory: unknown

and with this patch in containerd, it can get correct error log

OCI runtime restore failed: criu failed: type NOTIFY errno 0\nlog file: /tmp/testcr/cp3/restore.log: unknown
codecov-io commented 5 years ago

Codecov Report

Merging #52 into master will decrease coverage by 0.05%. The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #52      +/-   ##
=========================================
- Coverage    6.18%   6.12%   -0.06%     
=========================================
  Files           7       7              
  Lines         631     637       +6     
=========================================
  Hits           39      39              
- Misses        585     591       +6     
  Partials        7       7
Impacted Files Coverage Δ
runc.go 5.57% <0%> (-0.1%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7d11b49...4e99c72. Read the comment docs.

Ace-Tang commented 5 years ago

@crosbymichael , would you help to check this

crosbymichael commented 5 years ago

LGTM