Commit 61baffe
committed
Autoconfigure network without DHCP
Passt includes a DHCP server to allow guests to easily configure the
network without being aware passt is on the other side. But we _are_
aware of that, so we can take advantage of it.
Instead of using DHCP, read the configuration output from passt,
marshall it into some environment variables, pass it to the guest, and
have krun-guest read it and apply it using rtnetlink.
By doing that, we reduce the startup time in half, from...
$ time krun /bin/false
(...)
real 0m4,301s
... to ...
$ time krun /bin/false
(...)
real 0m1,966s
In addition of reducing the boot time, this potentially will prevent
some of the dhcp issues we've seen in the past.
Signed-off-by: Sergio Lopez <[email protected]>1 parent c11ac74 commit 61baffe
7 files changed
Lines changed: 383 additions & 89 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
236 | 242 | | |
237 | 243 | | |
238 | 244 | | |
239 | 245 | | |
240 | 246 | | |
241 | 247 | | |
242 | | - | |
| 248 | + | |
243 | 249 | | |
244 | 250 | | |
245 | 251 | | |
| |||
355 | 361 | | |
356 | 362 | | |
357 | 363 | | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| |||
0 commit comments