Skip to content

Commit

Permalink
ingester: Hide tokens in ingester ring status page when ingest storag…
Browse files Browse the repository at this point in the history
…e is enabled (#10399)

* Hide tokens when ingest storage is enabled

* changelog

* fix unrelated changelog copypaste
  • Loading branch information
alexweav authored Jan 15, 2025
1 parent 709316b commit a3e87ae
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* [ENHANCEMENT] OTLP: In addition to the flag `-distributor.otel-created-timestamp-zero-ingestion-enabled` there is now `-distributor.otel-start-time-quiet-zero` to convert OTel start timestamps to Prometheus QuietZeroNaNs. This flag is to make the change rollout safe between Ingesters and Distributors. #10238
* [ENHANCEMENT] Ruler: When rule concurrency is enabled for a rule group, its rules will now be reordered and run in batches based on their dependencies. This increases the number of rules that can potentially run concurrently. Note that the global and tenant-specific limits still apply #10400
* [ENHANCEMENT] Query-frontend: include more information about read consistency in trace spans produced when using experimental ingest storage. #10412
* [ENHANCEMENT] Ingester: Hide tokens in ingester ring status page when ingest storage is enabled #10399
* [BUGFIX] Distributor: Use a boolean to track changes while merging the ReplicaDesc components, rather than comparing the objects directly. #10185
* [BUGFIX] Querier: fix timeout responding to query-frontend when response size is very close to `-querier.frontend-client.grpc-max-send-msg-size`. #10154
* [BUGFIX] Query-frontend and querier: show warning/info annotations in some cases where they were missing (if a lazy querier was used). #10277
Expand Down
5 changes: 4 additions & 1 deletion pkg/ingester/ingester_ring.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ type RingConfig struct {
SpreadMinimizingZones flagext.StringSliceCSV `yaml:"spread_minimizing_zones" category:"advanced"`

// Injected internally
ListenPort int `yaml:"-"`
ListenPort int `yaml:"-"`
HideTokensInStatusPage bool `yaml:"-"`

// Used only for testing.
JoinAfter time.Duration `yaml:"-"`
Expand Down Expand Up @@ -155,6 +156,7 @@ func (cfg *RingConfig) ToRingConfig() ring.Config {
rc.ZoneAwarenessEnabled = cfg.ZoneAwarenessEnabled
rc.ExcludedZones = cfg.ExcludedZones
rc.SubringCacheDisabled = false // Enable subring caching.
rc.HideTokensInStatusPage = cfg.HideTokensInStatusPage

return rc
}
Expand Down Expand Up @@ -185,6 +187,7 @@ func (cfg *RingConfig) ToLifecyclerConfig() ring.LifecyclerConfig {
lc.ListenPort = cfg.ListenPort
lc.EnableInet6 = cfg.EnableIPv6
lc.RingTokenGenerator = cfg.customTokenGenerator()
lc.HideTokensInStatusPage = cfg.HideTokensInStatusPage

return lc
}
Expand Down
3 changes: 3 additions & 0 deletions pkg/mimir/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,8 @@ func (t *Mimir) initServer() (services.Service, error) {
}

func (t *Mimir) initIngesterRing() (serv services.Service, err error) {
t.Cfg.Ingester.IngesterRing.HideTokensInStatusPage = t.Cfg.IngestStorage.Enabled

t.IngesterRing, err = ring.New(t.Cfg.Ingester.IngesterRing.ToRingConfig(), "ingester", ingester.IngesterRingKey, util_log.Logger, prometheus.WrapRegistererWithPrefix("cortex_", t.Registerer))
if err != nil {
return nil, err
Expand Down Expand Up @@ -651,6 +653,7 @@ func (t *Mimir) tsdbIngesterConfig() {

func (t *Mimir) initIngesterService() (serv services.Service, err error) {
t.Cfg.Ingester.IngesterRing.ListenPort = t.Cfg.Server.GRPCListenPort
t.Cfg.Ingester.IngesterRing.HideTokensInStatusPage = t.Cfg.IngestStorage.Enabled
t.Cfg.Ingester.StreamTypeFn = ingesterChunkStreaming(t.RuntimeConfig)
t.Cfg.Ingester.InstanceLimitsFn = ingesterInstanceLimits(t.RuntimeConfig)
t.Cfg.Ingester.IngestStorageConfig = t.Cfg.IngestStorage
Expand Down

0 comments on commit a3e87ae

Please sign in to comment.