Skip to content

[live-migration] surface task exits through migration notifications - #2940

Merged
Harsh Rawat (rawahars) merged 2 commits into
microsoft:mainfrom
rawahars:lm_container_exit_notification
Sep 28, 2026
Merged

Harsh Rawat (rawahars) merged 2 commits into
microsoft:mainfrom
rawahars:lm_container_exit_notification

Conversation

@rawahars

Copy link
Copy Markdown
Contributor

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.

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>
@rawahars
Harsh Rawat (rawahars) requested a review from a team as a code owner September 24, 2026 18:06
Comment thread pkg/migration/parse.go
case *eventstypes.TaskExit:
return &Notification{
Origin: ToOrigin("", origin),
Phase: Phase_PHASE_TASK_EVENT,

@apurv15 apurv15 Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

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>
@rawahars
Harsh Rawat (rawahars) merged commit fd9f54f into microsoft:main Sep 28, 2026
20 checks passed
@rawahars
Harsh Rawat (rawahars) deleted the lm_container_exit_notification branch September 28, 2026 05:35
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.

2 participants