Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Method of judging command execution failure #52

Merged
merged 1 commit into from
Jun 3, 2019

Conversation

Ace-Tang
Copy link
Contributor

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

should judge restore and run command execution failure depend both on error and
status Monitor.Wait() return

Signed-off-by: Ace-Tang <aceapril@126.com>
@codecov-io
Copy link

codecov-io commented May 28, 2019

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%) ⬇️

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
Copy link
Contributor Author

@crosbymichael , would you help to check this

@crosbymichael
Copy link
Member

LGTM

Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/LGTM

@crosbymichael crosbymichael merged commit 9007c24 into containerd:master Jun 3, 2019
@Ace-Tang Ace-Tang deleted the fix-error-return branch July 3, 2019 12:42
thaJeztah added a commit to thaJeztah/docker that referenced this pull request Aug 26, 2019
- github.com/containerd/go-runc containerd/go-runc@7d11b49...9007c24
  - containerd/go-runc#52 Fix Method of judging command execution failure
    - fixes "init.pid: no such file or directory: unknown" errors

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
dmcgowan pushed a commit to thaJeztah/docker that referenced this pull request Oct 4, 2019
- github.com/containerd/go-runc containerd/go-runc@7d11b49...e029b79
  - containerd/go-runc#52 Fix Method of judging command execution failure
    - fixes "init.pid: no such file or directory: unknown" errors
  - containerd/go-runc#54 avoid setting NOTIFY_SOCKET from calling process

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
docker-jenkins pushed a commit to docker-archive/docker-ce that referenced this pull request Oct 8, 2019
- github.com/containerd/go-runc containerd/go-runc@7d11b49...e029b79
  - containerd/go-runc#52 Fix Method of judging command execution failure
    - fixes "init.pid: no such file or directory: unknown" errors
  - containerd/go-runc#54 avoid setting NOTIFY_SOCKET from calling process

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 1617be92d301de1386adabad5f241d3653b6c8ff
Component: engine
burnMyDread pushed a commit to burnMyDread/moby that referenced this pull request Oct 21, 2019
- github.com/containerd/go-runc containerd/go-runc@7d11b49...e029b79
  - containerd/go-runc#52 Fix Method of judging command execution failure
    - fixes "init.pid: no such file or directory: unknown" errors
  - containerd/go-runc#54 avoid setting NOTIFY_SOCKET from calling process

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Signed-off-by: zach <Zachary.Joyner@linux.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants