Repository navigation
Commit 68e2037
committed
Add LCOW live migration source and destination pathways
Introduce an end-to-end live-migration workflow for LCOW sandboxes, letting
a running sandbox be handed off from a source shim to a destination shim.
- Add a migration Controller that sequences a single session through a
source or destination lifecycle: the source prepares and exports an
opaque sandbox snapshot (VM + per-pod state), while the destination
imports it, patches each container onto its new IDs, builds the
destination VM, transfers memory over a shared socket, and finalizes
with a resume or stop.
- Expose the migration gRPC/ttrpc surface on the LCOW shim service
(PrepareAndExportSandbox, ImportSandbox, PrepareSandbox, TransferSandbox,
FinalizeSandbox, Cancel, Cleanup, CreateDuplicateSocket, Notifications)
and register it alongside the task and sandbox services.
- Wire migration into the task lifecycle: route destination-side CreateTask
for rehydrated containers into a patch path, and reject task mutations
(state, delete, kill) while a session is in progress.
- Add duplicated transport-socket adoption, a subscriber-based progress
notification stream, and proto/HCS conversion helpers for migration
options and events.
Signed-off-by: Harsh Rawat <harshrawat@microsoft.com>1 parent 41c7620 commit 68e2037
24 files changed
Lines changed: 4496 additions & 32 deletions
File tree
- cmd/containerd-shim-lcow-v2/service
- mocks
- internal/controller/migration
- mocks
- pkg/migration
Lines changed: 165 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
57 | 63 | | |
58 | 64 | | |
59 | 65 | | |
| |||
68 | 74 | | |
69 | 75 | | |
70 | 76 | | |
| 77 | + | |
71 | 78 | | |
72 | 79 | | |
73 | 80 | | |
| |||
95 | 102 | | |
96 | 103 | | |
97 | 104 | | |
| 105 | + | |
98 | 106 | | |
99 | 107 | | |
100 | 108 | | |
| |||
106 | 114 | | |
107 | 115 | | |
108 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
109 | 125 | | |
110 | 126 | | |
111 | 127 | | |
| |||
0 commit comments