Repository navigation
Commit c3aa089
committed
fix(microvm): handle multi-GB workload images on resume/restore paths
#287's micro-VM (kata + cloud-hypervisor) MVP builds the actor's virtio-blk
rootfs synchronously with mkfs.ext4 -d, bound by the resume RPC deadline. For a
small image that is sub-second; a real multi-GB image (OpenShell's ~3.2 GB
helpdesk supervisor) takes minutes, so the context is cancelled and mkfs is
SIGKILLed mid-write -- the actor never boots.
- ateom-microvm RunWorkload (golden boot): build the rootfs on a deadline-
detached context to a temp file + atomic rename; skip if it already exists.
Idempotent + crash-safe so the controller retries converge.
- ateom-microvm RunWorkload (restore reconstruct): detach the rebuild from the
RPC deadline too (reset-each-restore, so no idempotency).
- ateapi ResumeActor: hold the actor lock long enough to cover the build
(30s -> 5m; suspend/delete stay short).
- atenet router implicit-resume: 15s -> 5m, so a request that triggers a resume
waits for the multi-GB rebuild + VM restore instead of cancelling it.
Verified on CPU kind: the OpenShell helpdesk golden snapshot reaches Ready
(supervisor boots inside the kata guest + is checkpointed) and a resumed user
actor's agent serves /status, where before every path looped on
'mkfs.ext4 ... signal: killed'.
Signed-off-by: Davanum Srinivas <[email protected]>1 parent 89fd7b1 commit c3aa089
3 files changed
Lines changed: 37 additions & 6 deletions
File tree
- cmd
- ateapi/internal/controlapi
- atenet/internal/router
- ateom-microvm
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
156 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
219 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
220 | 242 | | |
221 | 243 | | |
222 | 244 | | |
| |||
866 | 888 | | |
867 | 889 | | |
868 | 890 | | |
869 | | - | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
870 | 898 | | |
871 | 899 | | |
872 | 900 | | |
| |||
0 commit comments