Commit 99113cf
authored
Add more options to df_engine docker build, slim down features for some packages (open-telemetry#1540)
This PR addresses a few problems that I ran into getting `df_engine`
running in my kubernetes environment. The end result of all this is that
you can now run a docker build like this: ` docker build --build-arg
FEATURES="azure" --build-arg RUSTFLAGS="-C target-feature=-gfni"
--build-arg DEBUG=1 --build-context otel-arrow=../../ -f Dockerfile -t
df_engine .`
# TLS
Some of the Azure SDK crates + reqwest have a lot of default features
enabled that we are not using and which rely on linking with openssl for
TLS. This was giving me trouble with our musl build.
I've disabled default features for these packages at the workspace level
and opted for using `rustls-tls` with reqwest in the `otap` crate.
# Configuring the docker build
- Added the `FEATURES` build arg to the dockerfile and the cross
platform build script so that you can turn on features like `azure` when
building
- Added the ability to specify `RUSTFLAGS` for the docker build so that
we can turn some features on or off when compiling which brings me to my
next item...
# Adding some optional debug utils to the image
When running on k8s I was getting very mysterious crashes after a couple
of seconds with 0 logs to stdout. Remoting into the container and
running the binary gave me the "Illegal instruction (core dumped)"
message, which was a start.
After checking the obvious vector extensions like SSE/AVX/AVX512, I was
stumped. So, I added gdb to the container and found the exact
instruction which is the longest mnemonic I have ever seen (comes from
arrow's buffer crate):
```
(gdb) x/i $pc
=> 0x7ffff745fb4f <new+463>: vgf2p8affineqb $0x0,%ymm3,%ymm5,%ymm5
```
Turns out my laptop has support for a specific feature called `gfni`,
which the nodes with Intel Xeon processors that I was running did not.
I think this will not be the last time someone needs to debug a native
code/cross-compilation problem, so I added an option to the build called
`DEBUG` that will include `gdb` (and maybe other debug utilities in the
future) in the image.1 parent 4889f00 commit 99113cf
File tree
4 files changed
+24
-9
lines changed- rust/otap-dataflow
- crates/otap
4 files changed
+24
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
| 154 | + | |
154 | 155 | | |
155 | | - | |
156 | | - | |
| 156 | + | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
25 | 35 | | |
26 | 36 | | |
27 | 37 | | |
28 | 38 | | |
29 | 39 | | |
30 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
31 | 46 | | |
32 | 47 | | |
33 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | | - | |
| 73 | + | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
0 commit comments