-
Notifications
You must be signed in to change notification settings - Fork 200
Make sure containers are deleted correctly #225
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
Conversation
I initially thought that the issue itself has been resolved, but it seems not.
|
Now I think our code was fine but the tests were wrong. Let's see. I'm going to work on the comments after CIs are being green. |
@@ -319,6 +320,10 @@ func (s *service) StartShim(shimCtx context.Context, containerID, containerdBina | |||
// task is deleted | |||
containerCount = 1 | |||
exitAfterAllTasksDeleted = true | |||
|
|||
log.Infof("will start a single-task VM %s since no VMID has been provided", s.vmID) |
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.
Good idea to add these!
251278d
to
68d2306
Compare
All tests are passing finally! |
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.
One minor nit comment and I additionally think the commits should be squashed into 1 before merging, but otherwise looks good!
|
||
resp, err := s.taskManager.DeleteProcess(requestCtx, req, s.agentClient) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
if req.ExecID != "" { |
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.
nit: I'd add a comment explaining why we skip deletion in this case
Before this change, we were only deleting the bundle directory on the deletion of a VM. Due to that, we had symlink conflicts when - We have multiple containers on a single VM - The containers have the same name Closes firecracker-microvm#65. Signed-off-by: Kazuyoshi Kato <[email protected]>
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.
LGTM!
cni/cmd/tc-redirect-tap: fix dropped test error
* Since firecracker-microvm/firecracker#2125, `cargo build` doesn't build jailer by default. (firecracker-microvm#263) * Fix Benchmark Goroutine (firecracker-microvm#259) * Jailer configuration API cleanup and improved logging with Debug log level (firecracker-microvm#255) * Firecracker is internally has an instance ID, but the SDK didn't have the way to configure the ID. This change connects Config.VMID to the instance ID. (firecracker-microvm#253) * Fixed error that was not being test against in `TestWait` (firecracker-microvm#251) * Fixes issue where socket path may not be defined since the config file has yet to be loaded (firecracker-microvm#230) * Fixed error that was not being test against in `TestNewPlugin` (firecracker-microvm#225) * Download Firecracker 0.21.1 and its jailer from Makefile (firecracker-microvm#218) Signed-off-by: xibz <[email protected]>
Issue #, if available:
#65
Description of changes:
While we cannot repro #65 anymore, we'd like to have some tests to
prevent regression.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.