Skip to content

Fix event forwarding from vminitd#165

Merged
dmcgowan merged 4 commits intocontainerd:mainfrom
dmcgowan:containerd-diff
Apr 24, 2026
Merged

Fix event forwarding from vminitd#165
dmcgowan merged 4 commits intocontainerd:mainfrom
dmcgowan:containerd-diff

Conversation

@dmcgowan
Copy link
Copy Markdown
Member

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)

Signed-off-by: Derek McGowan <derek@mcg.dev>
Copilot AI review requested due to automatic review settings April 23, 2026 07:41
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread internal/vminit/task/service.go
Comment thread internal/vminit/task/service.go Outdated
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>
@dmcgowan dmcgowan merged commit d0d9d52 into containerd:main Apr 24, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants