Commit 7016df1
authored
firecracker: fix docker -p (#11427)
Docker v28 configures direct-access filtering via iptables `-t raw` for
published ports. As a result, commands like `docker run -p <port>` fail
with
> iptables ... can't initialize iptables table `raw': Table does not
exist
because our current guest kernel configs all have `CONFIG_IP_NF_RAW`
disabled.
Repro: run the same `bb execute` command with firecracker isolation,
with and without `--action_env=DOCKER_INSECURE_NO_IPTABLES_RAW=1`;
manually start `dockerd &`, sleep for a bit then run `docker run -p ...`
Fix:
- Set `DOCKER_INSECURE_NO_IPTABLES_RAW=1` unconditionally when starting
dockerd in goinit. Includes an inline note explaining why this is safe
for our VM sandboxing model.
- Add TODOs at the top of all guest kernel config files to enable
`CONFIG_NF_TABLES` and remove the env-var fallback. (I don't want to do
this right now since I think it's slightly risky, so I'd rather save
this for when we incrementally start migrating to our new 6.1 config)
- Update docker-in-firecracker coverage to include `docker run -p ...`
on a newer docker version.
Context:
https://buildbuddy-corp.slack.com/archives/C0AFN0SMNG5/p1772129387671119?thread_ts=1772012498.295389&cid=C0AFN0SMNG51 parent 334b660 commit 7016df1
File tree
6 files changed
+24
-11
lines changed- enterprise
- server
- cmd/goinit
- remote_execution/containers/firecracker
- vmsupport/kernel
6 files changed
+24
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
196 | 195 | | |
| 196 | + | |
| 197 | + | |
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
Lines changed: 16 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
150 | 151 | | |
151 | 152 | | |
152 | 153 | | |
153 | | - | |
154 | | - | |
| 154 | + | |
| 155 | + | |
155 | 156 | | |
156 | 157 | | |
157 | 158 | | |
| |||
2455 | 2456 | | |
2456 | 2457 | | |
2457 | 2458 | | |
2458 | | - | |
| 2459 | + | |
2459 | 2460 | | |
2460 | 2461 | | |
2461 | 2462 | | |
| |||
2472 | 2473 | | |
2473 | 2474 | | |
2474 | 2475 | | |
2475 | | - | |
| 2476 | + | |
2476 | 2477 | | |
2477 | 2478 | | |
2478 | 2479 | | |
| |||
2481 | 2482 | | |
2482 | 2483 | | |
2483 | 2484 | | |
2484 | | - | |
| 2485 | + | |
2485 | 2486 | | |
2486 | 2487 | | |
2487 | 2488 | | |
| |||
2512 | 2513 | | |
2513 | 2514 | | |
2514 | 2515 | | |
| 2516 | + | |
| 2517 | + | |
| 2518 | + | |
| 2519 | + | |
| 2520 | + | |
| 2521 | + | |
| 2522 | + | |
| 2523 | + | |
2515 | 2524 | | |
2516 | 2525 | | |
2517 | 2526 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
3113 | 3114 | | |
3114 | 3115 | | |
3115 | 3116 | | |
3116 | | - | |
| 3117 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
3238 | 3239 | | |
3239 | 3240 | | |
3240 | 3241 | | |
3241 | | - | |
| 3242 | + | |
0 commit comments