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

fix: All lifecycler cfgs ref a valid IPv6 addr and port combination #11121

Merged
merged 3 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
* [10451](https://github.com/grafana/loki/pull/10451) **shantanualsi** Upgrade thanos `objstore`
* [10814](https://github.com/grafana/loki/pull/10814) **shantanualsi,kaviraj** Upgrade prometheus to v0.47.1 and dskit
* [10959](https://github.com/grafana/loki/pull/10959) **slim-bean** introduce a backoff wait on subquery retries.
* [11121](https://github.com/grafana/loki/pull/11121) **periklis** Ensure all lifecycler cfgs ref a valid IPv6 addr and port combination

#### Promtail

Expand Down
5 changes: 3 additions & 2 deletions pkg/distributor/distributor_ring.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package distributor

import (
"flag"
"fmt"
"net"
"os"
"strconv"
"time"

"github.com/go-kit/log"
Expand Down Expand Up @@ -72,7 +73,7 @@ func (cfg *RingConfig) ToBasicLifecyclerConfig(logger log.Logger) (ring.BasicLif

return ring.BasicLifecyclerConfig{
ID: cfg.InstanceID,
Addr: fmt.Sprintf("%s:%d", instanceAddr, instancePort),
Addr: net.JoinHostPort(instanceAddr, strconv.Itoa(instancePort)),
HeartbeatPeriod: cfg.HeartbeatPeriod,
HeartbeatTimeout: cfg.HeartbeatTimeout,
TokensObservePeriod: 0,
Expand Down
4 changes: 3 additions & 1 deletion pkg/ruler/base/ruler_ring.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ package base
import (
"flag"
"fmt"
"net"
"os"
"strconv"
"time"

"github.com/go-kit/log"
Expand Down Expand Up @@ -88,7 +90,7 @@ func (cfg *RingConfig) ToLifecyclerConfig(logger log.Logger) (ring.BasicLifecycl

return ring.BasicLifecyclerConfig{
ID: cfg.InstanceID,
Addr: fmt.Sprintf("%s:%d", instanceAddr, instancePort),
Addr: net.JoinHostPort(instanceAddr, strconv.Itoa(instancePort)),
HeartbeatPeriod: cfg.HeartbeatPeriod,
TokensObservePeriod: 0,
NumTokens: cfg.NumTokens,
Expand Down
5 changes: 3 additions & 2 deletions pkg/util/ring/ring_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package ring

import (
"flag"
"fmt"
"net"
"os"
"strconv"
"time"

"github.com/go-kit/log"
Expand Down Expand Up @@ -81,7 +82,7 @@ func (cfg *RingConfig) ToLifecyclerConfig(numTokens int, logger log.Logger) (rin

return ring.BasicLifecyclerConfig{
ID: cfg.InstanceID,
Addr: fmt.Sprintf("%s:%d", instanceAddr, instancePort),
Addr: net.JoinHostPort(instanceAddr, strconv.Itoa(instancePort)),
Zone: cfg.InstanceZone,
HeartbeatPeriod: cfg.HeartbeatPeriod,
TokensObservePeriod: 0,
Expand Down
Loading