-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
frontend: Use net.JoinHostPort
to support IPv6 addresses
#10650
Conversation
6079a74
to
301ce37
Compare
301ce37
to
5d101fc
Compare
Trivy scan found the following vulnerabilities:
|
I thought I got everything the last time I fixed IPv6 support with #11121. Thanks a lot! |
I believe you did get all the one's for the rings, but this one is for the front-ends. I should probably update the title and description for this PR to more accurately match that. |
Fixes an issue when using IPv6 where IPv6 addresses are not properly joined with ports resulting in the ring attempting to incorrectly use `::1:7946` instead of the proper `[::1]:7946` notation. With this change it's fully possible to use Loki within an IPv6 only network. Signed-off-by: Matthew Penner <[email protected]>
5d101fc
to
acd2393
Compare
net.JoinHostPort
to support IPv6 addressesnet.JoinHostPort
to support IPv6 addresses
Hey guys! |
Hello @periklis!
Please, if the current pull request addresses a bug fix, label it with the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-10650-to-release-2.9.x origin/release-2.9.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x a91f3f11b3bf15d559b7b9206fc7c2791ca71fdc When the conflicts are resolved, stage and commit the changes:
If you have the GitHub CLI installed: # Push the branch to GitHub:
git push --set-upstream origin backport-10650-to-release-2.9.x
# Create the PR body template
PR_BODY=$(gh pr view 10650 --json body --template 'Backport a91f3f11b3bf15d559b7b9206fc7c2791ca71fdc from #10650{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Create the PR on GitHub
echo "${PR_BODY}" | gh pr create --title "[release-2.9.x] frontend: Use `net.JoinHostPort` to support IPv6 addresses" --body-file - --label "size/S" --label "type/bug" --label "backport" --base release-2.9.x --milestone release-2.9.x --web Or, if you don't have the GitHub CLI installed (we recommend you install it!): # Push the branch to GitHub:
git push --set-upstream origin backport-10650-to-release-2.9.x
# Create a pull request where the `base` branch is `release-2.9.x` and the `compare`/`head` branch is `backport-10650-to-release-2.9.x`.
# Remove the local backport branch
git switch main
git branch -D backport-10650-to-release-2.9.x |
…0650) Signed-off-by: Matthew Penner <[email protected]> Co-authored-by: Periklis Tsirakidis <[email protected]> Co-authored-by: J Stickler <[email protected]> (cherry picked from commit a91f3f1)
…0650) Signed-off-by: Matthew Penner <[email protected]> Co-authored-by: Periklis Tsirakidis <[email protected]> Co-authored-by: J Stickler <[email protected]> (cherry picked from commit a91f3f1)
…addresses (#10650) (#11870) Co-authored-by: Matthew Penner <[email protected]>
…0650) Signed-off-by: Matthew Penner <[email protected]> Co-authored-by: Periklis Tsirakidis <[email protected]> Co-authored-by: J Stickler <[email protected]>
What this PR does / why we need it:
Fixes an issue when using IPv6 where IPv6 addresses are not properly joined with ports resulting in the ring attempting to incorrectly use
::1:7946
instead of the proper[::1]:7946
notation.With this change it's fully possible to use Loki within an IPv6 only network.
This PR also changes a few other areas that incorrectly join ports. But the main area where people are likely to run into this issue is with the frontend and worker service, hence the title and changelog entry referring to those only.
Which issue(s) this PR fixes:
Fixes #10532 (issue was closed with a workaround that shouldn't be required)
Special notes for your reviewer:
Checklist
CONTRIBUTING.md
guide (required)CHANGELOG.md
updatedadd-to-release-notes
labeldocs/sources/setup/upgrade/_index.md
production/helm/loki/Chart.yaml
and updateproduction/helm/loki/CHANGELOG.md
andproduction/helm/loki/README.md
. Example PRFor those interested in trying this out, here is a shortened snippet of the configuration changes I needed to make in order to get IPv6 working.