Commit f65306f
Summary: Add `iproute2` to test sysroot to install `tc` cli
This is a prerequisite for creating network interfaces that will exhibit
packet delays during bpf tests via a `netem` qdisc. This will allow us
to improve test coverage for the tcp stats source connector by causing
tcp retransmissions to occur within the test.
While `busybox` does include a `tc` command, I believe it doesn't
support the `tc qdisc add` command. See test plan below to see the error
caused when using busybox's version. I also looked at busybox's source
code and it doesn't appear to handle the `add` command from what I can
tell. I don't see any documentation that confirms this suspicion, but
using the `iproute2` version works as expected.
If there aren't concerns with this change, I will need assistance with
pushing new sysroots to GCS and updating
[sysroots.bzl](https://github.com/pixie-io/pixie/blob/6612f6307273f427baa6f51759e676ad579f4c70/bazel/cc_toolchains/sysroots/sysroots.bzl#L20)
with the new sysroots.
Relevant Issues: N/A
Type of change: /kind test-infra
Test Plan: Built a new sysroot manually and `scp`ed the files into a
qemu VM to verify that adding a `netem` qdsic works
```
# Try to create netem with busybox tc
bash-5.2# tc qdisc add dev eth1 root netem delay 100m
tc: invalid argument 'root' to 'command'
~/code/pixie/tools/docker/.build/sysroots (main) $ scp -i /tmp/tmp.crxC4TJvhi/ssh_key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -P 35975 sbin/tc root@127.0.0.1:/sbin/
~/code/pixie/tools/docker/.build/sysroots (main) $ scp -i /tmp/tmp.crxC4TJvhi/ssh_key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -P 35975 ./usr/lib/x86_64-linux-gnu/libbpf.so.1 root@127.0.0.1:/usr/lib/x86_64-linux-gnu/libbpf.so.1
# Successfully create netem qdisc with iproute2 tc
bash-5.2# /sbin/tc qdisc add dev eth1 root netem delay 100ms
bash-5.2#
bash-5.2# /sbin/tc qdisc show
[ ... ]
qdisc netem 8001: dev eth1 root refcnt 2 limit 1000 delay 100ms
```
---------
Signed-off-by: Dom Del Nano <ddelnano@pixielabs.ai>
Signed-off-by: James Bartlett <jamesbartlett@pixielabs.ai>
Co-authored-by: James Bartlett <jamesbartlett@pixielabs.ai>
1 parent 6612f63 commit f65306f
File tree
3 files changed
+18
-17
lines changed- bazel/cc_toolchains/sysroots
- tools/docker
- sysroot_creator/package_groups
3 files changed
+18
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
0 commit comments