Commit 8899a94
feat(writableStoreOverlay): make loading regInfo optional
- Introduce `microvm.registerClosure` option.
- Gate `regInfo` kernel cmdline and `load-db` behind `registerClosure`.
This way, writableStoreOverlay may be (ab)used with a persistent Nix DB:
- If guest Nix encounters a store path present in the lowerdir, it'll have to realize it, i.e. write a copy to the upper dir. There's a chance we'll
actually get a different copy (e.g. due to a different substitutor and/or non-deterministic builds), possibly leading to inconsistency.
- Perhaps inconsistencies can be avoided by registering the ro-store as a "substitutor"?
- We can now swap the guest image, GC the Host's store, and reboot. This is tolerable, because system paths were never registered in the guest db,
unless re-"realized" and copied to the upperdir.
This is not a pretty solution. E.g. when the Host store is mounted and the Guest reuses a store path from the Host, I'd maybe rather we dynamically create a
gcroot on the Host, but that's extra complexity.1 parent b9206e2 commit 8899a94
2 files changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
452 | 460 | | |
453 | 461 | | |
454 | 462 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
0 commit comments