Repository navigation
Commit 978c175
committed
fix(vm-driver): unpack registry images correctly and validate prepared disks
The image-prep guest expected `umoci raw unpack` to produce a bundle-style
rootfs/ subdirectory, but raw unpack extracts the filesystem directly into
the target. Every registry-path prep therefore FATALed after a successful
unpack, and two masking defects turned that into a silent permanent
failure: guest init exit codes do not survive the libkrun boundary (the VM
powers off cleanly regardless), and the prepared disk was cached without
validation, poisoning the content-addressed cache for the image digest.
- accept the raw-unpack layout in openshell-vm-sandbox-init.sh, keeping a
defensive branch for bundle-style output
- validate that a freshly built prep disk contains /image-rootfs before
renaming it into the cache; on failure, do not cache and surface the
guest console tail instead of reporting success
- size the prep disk for the payload and the unpacked rootfs coexisting
(payload*4 + 1 GiB; the image file is sparse so headroom is free)
Fixes NVIDIA#2358
Signed-off-by: s2cube <[email protected]>1 parent 8cf2673 commit 978c175
3 files changed
Lines changed: 105 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
176 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
177 | 187 | | |
178 | 188 | | |
179 | | - | |
180 | | - | |
181 | 189 | | |
182 | 190 | | |
183 | 191 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
2437 | 2437 | | |
2438 | 2438 | | |
2439 | 2439 | | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
| 2450 | + | |
| 2451 | + | |
| 2452 | + | |
| 2453 | + | |
| 2454 | + | |
| 2455 | + | |
| 2456 | + | |
| 2457 | + | |
| 2458 | + | |
| 2459 | + | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
| 2463 | + | |
| 2464 | + | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
2440 | 2471 | | |
2441 | 2472 | | |
2442 | 2473 | | |
| |||
4884 | 4915 | | |
4885 | 4916 | | |
4886 | 4917 | | |
| 4918 | + | |
| 4919 | + | |
| 4920 | + | |
| 4921 | + | |
4887 | 4922 | | |
4888 | | - | |
4889 | | - | |
| 4923 | + | |
| 4924 | + | |
4890 | 4925 | | |
4891 | 4926 | | |
4892 | 4927 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
655 | 655 | | |
656 | 656 | | |
657 | 657 | | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
658 | 712 | | |
659 | 713 | | |
660 | 714 | | |
| |||
0 commit comments