You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ go test -exec sudo -v ./cmd/nerdctl/... -run TestRunRestart -args -test.kill-daemon
test target: "nerdctl"
=== RUN TestRunRestart
run_restart_linux_test.go:44: NOTE: this test may take a while
run_restart_linux_test.go:71: killing "containerd.service"
run_restart_linux_test.go:72: checking activity of "containerd.service"
run_restart_linux_test.go:72: (retry=0) active
run_restart_linux_test.go:72: daemon "containerd.service" is now running, checking whether the daemon can handle requests
run_restart_linux_test.go:72: (retry=0) time="2022-04-20T10:00:42Z" level=fatal msg="failed to dial \"/run/containerd/containerd.sock\": connection error: desc = \"transport: error while dialing: dial unix /run/containerd/containerd.sock: connect: connection refused\""
run_restart_linux_test.go:72: (retry=1) activating
run_restart_linux_test.go:72: (retry=2) active
run_restart_linux_test.go:72: daemon "containerd.service" is now running, checking whether the daemon can handle requests
run_restart_linux_test.go:72: daemon "containerd.service" can now handle requests
run_restart_linux_test.go:79: (retry 0) ps -a: "CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\n367bda156295 ghcr.io/stargz-containers/nginx:1.19-alpine-org \"/docker-entrypoint.…\" 15 minutes ago Created c1-in-n0 \n3843c3975c6f ghcr.io/stargz-containers/nginx:1.19-alpine-org \"/docker-entrypoint.…\" 15 minutes ago Created c2-in-n1 \n6465b0b125f6 ghcr.io/stargz-containers/nginx:1.19-alpine-org \"/docker-entrypoint.…\" 6 seconds ago Up 127.0.0.1:8080->80/tcp nerdctl-testrunrestart \nd941b0eec3a5 ghcr.io/stargz-containers/nginx:1.19-alpine-org \"/docker-entrypoint.…\" 15 minutes ago Created c0-in-n0 \nf0460d99d436 ghcr.io/stargz-containers/nginx:1.19-alpine-org \"/docker-entrypoint.…\" 15 minutes ago Created c3-in-bridge \n"
run_restart_linux_test.go:82: test is passing, after 0 retries
--- PASS: TestRunRestart (6.89s)
PASS
ok github.com/containerd/nerdctl/cmd/nerdctl 6.906s
The reason will be displayed to describe this comment to others. Learn more.
if desiredStatus is running, the "on-failure" case will get empty status in the Line 245.
I am not sure that there is a way to store the status after delete. Anyway, it is safe to use with nerdctl.
Maybe we can add the comment about known issue.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Ye Sijun junnplus@gmail.com
Report of @AkihiroSuda #6830 (comment)
I'm sorry for misunderstanding 9503d72#diff-a9d90e82d0fee932f0437ab217a8ef14e4a56b4be02321de5193de0ad98e20f9L239-L249
For the case when
Task
returns not found and the restart desired to running, we need to continue to restart the container.