Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix][query] Fix misconfiguration in TLS settings from using OTEL HTT…
…P helper (jaegertracing#6239) ## Which problem is this PR solving? - Fixes jaegertracing#6230 ## Description of the changes - This PR fixes an oversight that was made when migrating to OTEL's helpers for creating the HTTP server. OTEL's helper was adding TLS to the listener whereas we left the code to add TLS to the server. This was leading to the connection being in a weird state causing the bug in jaegertracing#6230. This PR simplifies the flow by doing the following: - We do not need to add TLS to the server because its added when the listener is initialized using `.ToListener()` - We do not need to call `ServeTLS` and can simply call `Serve` and TLS will be used when the connection is configured to do so (which it will be if the TLSSetting is set on the server). ## How was this change tested? Start the server by doing the following ``` go run ./cmd/all-in-one \ --query.http.tls.enabled=true \ --query.http.tls.cert=./pkg/config/tlscfg/testdata/example-server-cert.pem \ --query.http.tls.key=./pkg/config/tlscfg/testdata/example-server-key.pem ``` Send request with HTTP1.1 ``` curl -k --http1.1 https://localhost:16686/ > /dev/null % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4454 0 4454 0 0 393k 0 --:--:-- --:--:-- --:--:-- 869k ``` Send request with HTTP2 (default) ``` curl -k --http2 https://localhost:16686/ > /dev/null % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4454 0 4454 0 0 140k 0 --:--:-- --:--:-- --:--:-- 173k ``` ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [ ] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` --------- Signed-off-by: Mahad Zaryab <[email protected]>
- Loading branch information