Fix event forwarding from vminitd#165
Merged
dmcgowan merged 4 commits intocontainerd:mainfrom Apr 24, 2026
Merged
Conversation
Signed-off-by: Derek McGowan <derek@mcg.dev>
There was a problem hiding this comment.
Pull request overview
This PR syncs shim-related changes from upstream containerd to address an event forwarding issue observed during shim conformance testing, aiming to ensure task lifecycle events emitted by vminitd are reliably published to the host before shutdown.
Changes:
- Wait for the event-forwarding goroutine to drain queued events during shutdown (
internal/vminit/task/service.go). - Treat logger subprocess exit due to self-sent SIGTERM as non-error (
internal/vminit/process/io.go). - Fix typos in comments and an error message format string (
internal/vminit/process/io_util.go,internal/vminit/process/exec.go).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| internal/vminit/task/service.go | Coordinates shutdown with event forwarding by closing the events channel and waiting for the forwarder to finish. |
| internal/vminit/process/io.go | Adjusts cancellation semantics to ignore expected SIGTERM exits from the logging helper process. |
| internal/vminit/process/exec.go | Fixes an error message typo/formatting in exec pid retrieval. |
| internal/vminit/process/io_util.go | Fixes a comment typo. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
akerouanton
approved these changes
Apr 23, 2026
Ensure event forwards have been fully processed before completing shutdown Signed-off-by: Derek McGowan <derek@mcg.dev>
Signed-off-by: Derek McGowan <derek@mcg.dev>
Signed-off-by: Derek McGowan <derek@mcg.dev>
8b1b043 to
0eb9521
Compare
akerouanton
approved these changes
Apr 23, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This change synchronizes some changes to the shim from containerd including an events issue that showed up during shim conformance testing (https://github.com/dmcgowan/shimtest/actions/runs/24819836245/job/72641937503)