[live-migration] surface task exits through migration notifications - #2940
Merged
Harsh Rawat (rawahars) merged 2 commits intoSep 28, 2026
Merged
Harsh Rawat (rawahars) merged 2 commits into
Harsh Rawat (rawahars) merged 2 commits into
Conversation
Migration notification streams currently report only HCS migration progress. When a container exits inside the UVM during migration, containerd receives the TaskExit event, but migration clients have no equivalent signal. This change extends migration notifications with a task-event phase and preserve the complete TaskExit payload. Forward supported task events through the existing sequenced notification stream while continuing to publish them normally to containerd. Unsupported task events remain ignored. Signed-off-by: Harsh Rawat <harshrawat@microsoft.com>
apurv15
reviewed
Sep 26, 2026
| case *eventstypes.TaskExit: | ||
| return &Notification{ | ||
| Origin: ToOrigin("", origin), | ||
| Phase: Phase_PHASE_TASK_EVENT, |
Contributor
There was a problem hiding this comment.
Would this relay exec process exit notification also to migration notification subscribers? Our goal is to relay only container exit notifications to migration notification subscribers.
Contributor
Author
There was a problem hiding this comment.
Migration cannot be initiated if there are any active execs and post initiation, we cannot create new execs.
Therefore, we won’t send any Task Exit for Exec.
apurv15
approved these changes
Sep 26, 2026
Migration notification streams may need to be established before PrepareAndExportSandbox or ImportSandbox so task exits occurring after source state capture are not lost. Previously, notification setup depended on the VM migration event source already being available. Allow either Notifications or the setup operation to reserve the session ID. Early subscribers receive task-exit events immediately, while VM migration events begin forwarding once the compute-system stream becomes available. Keep VM event forwarding idempotent and retryable, and allow Cleanup to release a notification-only idle session. Signed-off-by: Harsh Rawat <harshrawat@microsoft.com>
apurv15
approved these changes
Sep 27, 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.
Migration notification streams currently report only HCS migration progress. When a container exits inside the UVM during migration, containerd receives the TaskExit event, but migration clients have no equivalent signal.
This change extends migration notifications with a task-event phase and preserve the complete TaskExit payload. Forward supported task events through the existing sequenced notification stream while continuing to publish them normally to containerd.
Unsupported task events remain ignored.