Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

shim v2: fix set status when container exit#1601

Merged
lifupan merged 1 commit intokata-containers:masterfrom
Ace-Tang:exit_status
May 1, 2019
Merged

shim v2: fix set status when container exit#1601
lifupan merged 1 commit intokata-containers:masterfrom
Ace-Tang:exit_status

Conversation

@Ace-Tang
Copy link
Contributor

in wait function, should send msg to exit channel after task status has
updated, since shim.Wait() is running in another goroutine, when it
receive msg from exit channel, it will stop waiting and return, then
someone who hold this Wait() get return, it can delete task, if exit msg
is send first, the container status may still be running.

Fixes: #1600

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

in wait function, should send msg to exit channel after task status has
updated, since shim.Wait() is running in another goroutine, when it
receive msg from exit channel, it will stop waiting and return, then
someone who hold this Wait() get return, it can delete task, if exit msg
is send first, the container status may still be running.

Fixes: #1600

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

lifupan commented Apr 29, 2019

/test

@grahamwhaley grahamwhaley requested review from devimc and sboeuf April 29, 2019 08:49
@devimc devimc requested a review from lifupan April 29, 2019 13:07
@Ace-Tang
Copy link
Contributor Author

Fail with

• Failure [29.350 seconds]
[Serial Test] Hot plug CPUs
/tmp/jenkins/workspace/kata-containers-runtime-ubuntu-18-04-PR-initrd/go/src/github.com/kata-containers/tests/integration/docker/cpu_test.go:54
  container with CPU constraint
  /tmp/jenkins/workspace/kata-containers-runtime-ubuntu-18-04-PR-initrd/go/src/github.com/kata-containers/tests/vendor/github.com/onsi/ginkgo/extensions/table/table.go:92
    should have 3 CPUs [It]
    /tmp/jenkins/workspace/kata-containers-runtime-ubuntu-18-04-PR-initrd/go/src/github.com/kata-containers/tests/vendor/github.com/onsi/ginkgo/extensions/table/table_entry.go:46

    Expected
        <int>: 1
    to be zero-valued

    /tmp/jenkins/workspace/kata-containers-runtime-ubuntu-18-04-PR-initrd/go/src/github.com/kata-containers/tests/integration/docker/cpu_test.go:107
------------------------------
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS

Summarizing 1 Failure:

[Fail] [Serial Test] Hot plug CPUs container with CPU constraint [It] should have 3 CPUs 

Seems not releated to the PR, do someone see this fails before

@teawater
Copy link
Member

Fail with

• Failure [29.350 seconds]
[Serial Test] Hot plug CPUs
/tmp/jenkins/workspace/kata-containers-runtime-ubuntu-18-04-PR-initrd/go/src/github.com/kata-containers/tests/integration/docker/cpu_test.go:54
  container with CPU constraint
  /tmp/jenkins/workspace/kata-containers-runtime-ubuntu-18-04-PR-initrd/go/src/github.com/kata-containers/tests/vendor/github.com/onsi/ginkgo/extensions/table/table.go:92
    should have 3 CPUs [It]
    /tmp/jenkins/workspace/kata-containers-runtime-ubuntu-18-04-PR-initrd/go/src/github.com/kata-containers/tests/vendor/github.com/onsi/ginkgo/extensions/table/table_entry.go:46

    Expected
        <int>: 1
    to be zero-valued

    /tmp/jenkins/workspace/kata-containers-runtime-ubuntu-18-04-PR-initrd/go/src/github.com/kata-containers/tests/integration/docker/cpu_test.go:107
------------------------------
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS

Summarizing 1 Failure:

[Fail] [Serial Test] Hot plug CPUs container with CPU constraint [It] should have 3 CPUs 

Seems not releated to the PR, do someone see this fails before

I just restart the failed tests.

@lifupan lifupan merged commit 98d6053 into kata-containers:master May 1, 2019
@Ace-Tang Ace-Tang deleted the exit_status branch May 5, 2019 03:20
@ganeshmaharaj ganeshmaharaj mentioned this pull request Jun 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

shim v2: uncorrect order to set container status when container exit

5 participants