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

Tests: distributor_test.go fails when the system has no interface name in [eth0, en0, lo0] #2356

Closed
shdubsh opened this issue Jul 15, 2020 · 2 comments · Fixed by #2645
Closed
Labels
good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! keepalive An issue or PR that will be kept alive and never marked as stale.

Comments

@shdubsh
Copy link

shdubsh commented Jul 15, 2020

Describe the bug
Distributor tests fail when the test system does not have any network interfaces named eth0, en0, or lo0.

To Reproduce
make test on a system without any interfaces named eth0, en0, or lo0.

Expected behavior
make test should pass.

Environment:

  • Debian buster
  • Golang 1.13.6-2~bpo10+1

Screenshots, Promtail config, or terminal output

--- FAIL: TestDistributor_PushIngestionRateLimiter (0.00s)
    --- PASS: TestDistributor_PushIngestionRateLimiter/local_strategy:_limit_should_be_set_to_each_distributor (0.00s)
    --- FAIL: TestDistributor_PushIngestionRateLimiter/global_strategy:_limit_should_be_evenly_shared_across_distributors (0.00s)
        distributor_test.go:230: 
            	Error Trace:	distributor_test.go:230
            	            				distributor_test.go:167
            	Error:      	Received unexpected error:
            	            	No address found for [eth0 en0 lo0]
            	Test:       	TestDistributor_PushIngestionRateLimiter/global_strategy:_limit_should_be_evenly_shared_across_distributors
    --- FAIL: TestDistributor_PushIngestionRateLimiter/global_strategy:_burst_should_set_to_each_distributor (0.00s)
        distributor_test.go:230: 
            	Error Trace:	distributor_test.go:230
            	            				distributor_test.go:167
            	Error:      	Received unexpected error:
            	            	No address found for [eth0 en0 lo0]
            	Test:       	TestDistributor_PushIngestionRateLimiter/global_strategy:_burst_should_set_to_each_distributor
@stale
Copy link

stale bot commented Aug 14, 2020

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@cyriltovena cyriltovena added keepalive An issue or PR that will be kept alive and never marked as stale. good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! labels Sep 11, 2020
@cyriltovena
Copy link
Contributor

Not a high priority but would be nice to have indeed.

arl added a commit to arl/loki that referenced this issue Sep 19, 2020
TestDistributor_PushIngestionRateLimiter failed if the system had no
interface name in "eth0", "en0" or "lo0".

Fix that by looking at the name of the loopback interface in the list
of the system's network interfaces, then using that name in the test.

Fixes grafana#2356
owen-d pushed a commit that referenced this issue Sep 21, 2020
TestDistributor_PushIngestionRateLimiter failed if the system had no
interface name in "eth0", "en0" or "lo0".

Fix that by looking at the name of the loopback interface in the list
of the system's network interfaces, then using that name in the test.

Fixes #2356
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! keepalive An issue or PR that will be kept alive and never marked as stale.
Projects
None yet
2 participants