Skip to content
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

Loki: Append loopback to ingester net interface default list #4570

Merged
merged 3 commits into from
Oct 29, 2021

Conversation

DylanGuedes
Copy link
Contributor

@DylanGuedes DylanGuedes commented Oct 27, 2021

What this PR does / why we need it:

  • Append the loopback net interface to the list of net interfaces used by the ingester ring. The loopback append only occurs if the user didn't set a list of interface names for the ingester ring
  • Move LoopbackInterfaceName function to a separate util/net package
  • Test the behavior for setting interface names for the rings. The caveat is that the ingester ring values are copied to other rings but just when their own ring isn't set

Which issue(s) this PR fixes:
Fixes #4483

Special notes for your reviewer:

  • N/A

Checklist

  • Documentation added
  • Tests updated

@DylanGuedes DylanGuedes force-pushed the add-lo-net-interface branch 2 times, most recently from 7934c2c to 52c70f4 Compare October 27, 2021 21:39
@DylanGuedes DylanGuedes marked this pull request as ready for review October 27, 2021 21:42
@DylanGuedes DylanGuedes requested a review from a team as a code owner October 27, 2021 21:42
Copy link
Contributor

@sandeepsukhani sandeepsukhani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

- Create new package `util/net` and puts `LoopbackInterfaceName` there
- Modify distributor_test to use `util/net` package
- Append the loopback net interface to the list of net interfaces used
  by the ingester ring. The append only occurs if the ingester net
interfaces are default
- Add CHANGELOG entry
- Add tests to check the current net interface name resolution. The
  tests checks if the ingester ring net interface names are correctly
copied to other rings
Copy link
Member

@owen-d owen-d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: default ring listen address to 127.0.0.1 when no default network interface is found
3 participants