-
Notifications
You must be signed in to change notification settings - Fork 614
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
Add nerdctl compose stop
command
#1494
Conversation
Seems the CI failed due to a flaky test (#767). The issue is due to conflict container names. nerdctl/cmd/nerdctl/run_mount_linux_test.go Lines 232 to 237 in e83e18b
# log
=== CONT TestRunCopyingUpInitialContentsShouldNotResetTheCopiedContents
testutil.go:458: buildkitHost="unix:///run/user/1000/buildkit-nerdctl-test/buildkitd.sock"
run_mount_linux_test.go:233: container nerdctl-testruncopyingupinitialcontentsshouldnotresetthecopiedcontents is now running
run_mount_linux_test.go:230: assertion failed: res.ExitCode is not exitCode: time="2022-11-10T00:45:37Z" level=fatal msg="name \"nerdctl-testruncopyingupinitialcontentsshouldnotresetthecopiedcontents\" is already used by ID \"7ce7a2031325302a265d2ed8836b5179488fd6835d6938325b52ec18e7e5e7d9\""
--- FAIL: TestRunCopyingUpInitialContentsShouldNotResetTheCopiedContents (2.24s) Within the same file, another test case seems avoid the issue by not specifying
v.s.
|
46f1900
to
07dfe22
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
07dfe22
to
31ab0de
Compare
Signed-off-by: Jin Dong <[email protected]>
31ab0de
to
805e63c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
Fix #666
This implementation uses
nerdctl stop [flags] container
to stop all containers in given services, similar to howcompose down
works link.I didn't use a
WaitGroup
to parallelize thenerdctl stop
calls, as in here, since I'm not sure whatforcibly
/gracefully
means. Thanks for any explanation and I can optimize (seems some refactor/dedup can be done here as well)Also in the same place, it seems like a bug. This line should be outside of
for
loop right?I'll also try to add test as well.
Signed-off-by: Jin Dong [email protected]