Commit 57ce748
Shreyansh Sancheti
guest: use OCIBundlePath as sandbox root source of truth
Refactor the guest runtime to derive all sandbox paths from the
host-provided OCIBundlePath rather than reconstructing them from
hardcoded prefixes. This makes the GCS path-agnostic: it works with
any OCIBundlePath the shim sends, regardless of prefix.
Key changes:
- runc.NewRuntime() no longer takes a base log path; runc.log is
co-located with each container's bundlePath
- Host.sandboxRoots map tracks the resolved sandbox root per container
- CreateContainer registers sandbox roots; RemoveContainer cleans up
- Sandbox, standalone, and workload container setup functions accept
a resolved sandboxRoot parameter
- New *FromRoot helpers in spec.go for sandbox subdirectory paths
- runtime.Runtime.CreateContainer now takes sandboxID parameter
Signed-off-by: Shreyansh Jain <shreyanshjain7174@gmail.com>
Signed-off-by: Shreyansh Sancheti <shsancheti@microsoft.com>1 parent c0ec0f1 commit 57ce748
File tree
14 files changed
+736
-245
lines changed- cmd/gcs
- internal/guest
- runtime
- hcsv2
- runc
- spec
- test/gcs
14 files changed
+736
-245
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
| |||
297 | 296 | | |
298 | 297 | | |
299 | 298 | | |
300 | | - | |
301 | | - | |
302 | 299 | | |
303 | 300 | | |
304 | 301 | | |
| |||
384 | 381 | | |
385 | 382 | | |
386 | 383 | | |
387 | | - | |
| 384 | + | |
388 | 385 | | |
389 | 386 | | |
390 | 387 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| |||
76 | 75 | | |
77 | 76 | | |
78 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
79 | 82 | | |
80 | 83 | | |
81 | 84 | | |
| |||
228 | 231 | | |
229 | 232 | | |
230 | 233 | | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
240 | 237 | | |
241 | 238 | | |
242 | 239 | | |
243 | | - | |
244 | | - | |
| 240 | + | |
| 241 | + | |
245 | 242 | | |
246 | 243 | | |
247 | 244 | | |
248 | | - | |
249 | | - | |
| 245 | + | |
| 246 | + | |
250 | 247 | | |
251 | 248 | | |
252 | 249 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
| 27 | + | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
| 31 | + | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 41 | + | |
| 42 | + | |
48 | 43 | | |
49 | 44 | | |
50 | 45 | | |
51 | | - | |
| 46 | + | |
52 | 47 | | |
53 | 48 | | |
54 | 49 | | |
| |||
62 | 57 | | |
63 | 58 | | |
64 | 59 | | |
65 | | - | |
| 60 | + | |
66 | 61 | | |
67 | 62 | | |
68 | 63 | | |
69 | 64 | | |
70 | 65 | | |
71 | 66 | | |
72 | | - | |
| 67 | + | |
73 | 68 | | |
74 | 69 | | |
75 | 70 | | |
76 | 71 | | |
77 | 72 | | |
| 73 | + | |
78 | 74 | | |
79 | 75 | | |
80 | 76 | | |
| |||
97 | 93 | | |
98 | 94 | | |
99 | 95 | | |
100 | | - | |
| 96 | + | |
101 | 97 | | |
102 | 98 | | |
103 | 99 | | |
| |||
0 commit comments