Skip to content

Remove deprecated flags from months ago #2339

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

Merged
merged 1 commit into from
Mar 28, 2020
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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## master / unreleased

* [CHANGE] Remove the following deprecated flags:
- `-metrics.error-rate-query` (use `-metrics.write-throttle-query` instead).
- `-store.cardinality-cache-size` (use `-store.index-cache-read.enable-fifocache` and `-store.index-cache-read.fifocache.size` instead).
- `-store.cardinality-cache-validity` (use `-store.index-cache-read.enable-fifocache` and `-store.index-cache-read.fifocache.duration` instead).
- `-distributor.limiter-reload-period` (flag unused)
- `-ingester.claim-on-rollout` (flag unused)
- `-ingester.normalise-tokens` (flag unused)
* [CHANGE] Renamed YAML file options to be more consistent. See full config file changes below. #2273
* [CHANGE] Renamed the `memcache.write-back-goroutines` and `memcache.write-back-buffer` flags to `background.write-back-concurrency` and `background.write-back-buffer`. This affects the following flags:
- `-frontend.memcache.write-back-buffer` --> `-frontend.background.write-back-buffer`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ ingester:
lifecycler:
# We want to start immediately.
join_after: 0
claim_on_rollout: false
final_sleep: 0s
num_tokens: 512

Expand Down
1 change: 0 additions & 1 deletion development/tsdb-blocks-storage-s3/config/cortex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ ingester:
lifecycler:
# We want to start immediately.
join_after: 0
claim_on_rollout: false
final_sleep: 0s
num_tokens: 512

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ ingester:
# ingesters joining at the same time can have conflicting tokens if they don't see each other yet.
observe_period: 10s
min_ready_duration: 0s
claim_on_rollout: false
final_sleep: 5s
num_tokens: 512

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ ingester:
# ingesters joining at the same time can have conflicting tokens if they don't see each other yet.
observe_period: 10s
min_ready_duration: 0s
claim_on_rollout: false
final_sleep: 5s
num_tokens: 512

Expand Down
1 change: 0 additions & 1 deletion docs/configuration/single-process-config-blocks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ ingester:
# We want to start immediately and flush on shutdown.
join_after: 0
min_ready_duration: 0s
claim_on_rollout: false
final_sleep: 0s
num_tokens: 512

Expand Down
1 change: 0 additions & 1 deletion docs/configuration/single-process-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ ingester:

# We want to start immediately and flush on shutdown.
join_after: 0
claim_on_rollout: false
final_sleep: 0s
num_tokens: 512

Expand Down
1 change: 0 additions & 1 deletion docs/configuration/single-process-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ ingester:
# We want to start immediately and flush on shutdown.
join_after: 0
min_ready_duration: 0s
claim_on_rollout: false
final_sleep: 0s
num_tokens: 512

Expand Down
1 change: 0 additions & 1 deletion docs/guides/cortex-with-cassandra.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ ingester:

# We want to start immediately and flush on shutdown.
join_after: 0
claim_on_rollout: false
final_sleep: 0s
num_tokens: 512

Expand Down
1 change: 0 additions & 1 deletion k8s/ingester-dep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ spec:
args:
- -target=ingester
- -ingester.join-after=30s
- -ingester.claim-on-rollout=true
- -consul.hostname=consul.default.svc.cluster.local:8500
- -s3.url=s3://abc:[email protected]:4569
- -dynamodb.url=dynamodb://user:[email protected]:8000
Expand Down
8 changes: 0 additions & 8 deletions pkg/chunk/aws/metrics_autoscaling.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ type MetricsAutoScalingConfig struct {
UsageQuery string `yaml:"write_usage_query"` // Promql query to fetch write capacity usage per table
ReadUsageQuery string `yaml:"read_usage_query"` // Promql query to fetch read usage per table
ReadErrorQuery string `yaml:"read_error_query"` // Promql query to fetch read errors per table

deprecatedErrorRateQuery string
}

// RegisterFlags adds the flags required to config this to the given FlagSet
Expand All @@ -65,8 +63,6 @@ func (cfg *MetricsAutoScalingConfig) RegisterFlags(f *flag.FlagSet) {
f.StringVar(&cfg.UsageQuery, "metrics.usage-query", defaultUsageQuery, "query to fetch write capacity usage per table")
f.StringVar(&cfg.ReadUsageQuery, "metrics.read-usage-query", defaultReadUsageQuery, "query to fetch read capacity usage per table")
f.StringVar(&cfg.ReadErrorQuery, "metrics.read-error-query", defaultReadErrorQuery, "query to fetch read errors per table")

f.StringVar(&cfg.deprecatedErrorRateQuery, "metrics.error-rate-query", "", "DEPRECATED: use -metrics.write-throttle-query instead")
}

type metricsData struct {
Expand All @@ -83,10 +79,6 @@ type metricsData struct {
}

func newMetrics(cfg DynamoDBConfig) (*metricsData, error) {
if cfg.Metrics.deprecatedErrorRateQuery != "" {
level.Warn(util.Logger).Log("msg", "use of deprecated flag -metrics.error-rate-query")
cfg.Metrics.ThrottleQuery = cfg.Metrics.deprecatedErrorRateQuery
}
client, err := promApi.NewClient(promApi.Config{Address: cfg.Metrics.URL})
if err != nil {
return nil, err
Expand Down
5 changes: 0 additions & 5 deletions pkg/chunk/chunk_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"github.com/cortexproject/cortex/pkg/chunk/cache"
"github.com/cortexproject/cortex/pkg/util"
"github.com/cortexproject/cortex/pkg/util/extract"
"github.com/cortexproject/cortex/pkg/util/flagext"
"github.com/cortexproject/cortex/pkg/util/spanlogger"
"github.com/cortexproject/cortex/pkg/util/validation"
)
Expand Down Expand Up @@ -70,10 +69,6 @@ func (cfg *StoreConfig) RegisterFlags(f *flag.FlagSet) {

f.DurationVar(&cfg.CacheLookupsOlderThan, "store.cache-lookups-older-than", 0, "Cache index entries older than this period. 0 to disable.")
f.DurationVar(&cfg.MaxLookBackPeriod, "store.max-look-back-period", 0, "Limit how long back data can be queried")

// Deprecated.
flagext.DeprecatedFlag(f, "store.cardinality-cache-size", "DEPRECATED. Use store.index-cache-read.enable-fifocache and store.index-cache-read.fifocache.size instead.")
flagext.DeprecatedFlag(f, "store.cardinality-cache-validity", "DEPRECATED. Use store.index-cache-read.enable-fifocache and store.index-cache-read.fifocache.duration instead.")
}

// store implements Store
Expand Down
2 changes: 0 additions & 2 deletions pkg/distributor/distributor.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
"github.com/cortexproject/cortex/pkg/ring"
"github.com/cortexproject/cortex/pkg/util"
"github.com/cortexproject/cortex/pkg/util/extract"
"github.com/cortexproject/cortex/pkg/util/flagext"
"github.com/cortexproject/cortex/pkg/util/limiter"
"github.com/cortexproject/cortex/pkg/util/services"
"github.com/cortexproject/cortex/pkg/util/validation"
Expand Down Expand Up @@ -146,7 +145,6 @@ func (cfg *Config) RegisterFlags(f *flag.FlagSet) {
f.IntVar(&cfg.MaxRecvMsgSize, "distributor.max-recv-msg-size", 100<<20, "remote_write API max receive message size (bytes).")
f.DurationVar(&cfg.RemoteTimeout, "distributor.remote-timeout", 2*time.Second, "Timeout for downstream ingesters.")
f.DurationVar(&cfg.ExtraQueryDelay, "distributor.extra-query-delay", 0, "Time to wait before sending more than the minimum successful query requests.")
flagext.DeprecatedFlag(f, "distributor.limiter-reload-period", "DEPRECATED. No more required because the local limiter is reconfigured as soon as the overrides change.")
f.BoolVar(&cfg.ShardByAllLabels, "distributor.shard-by-all-labels", false, "Distribute samples based on all labels, as opposed to solely by user and metric name.")
}

Expand Down
6 changes: 0 additions & 6 deletions pkg/ring/lifecycler.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ type LifecyclerConfig struct {
Port int `doc:"hidden"`
ID string `doc:"hidden"`
SkipUnregister bool `yaml:"-"`

// graveyard for unused flags.
UnusedFlag bool `yaml:"claim_on_rollout,omitempty"` // DEPRECATED - left for backwards-compatibility
UnusedFlag2 bool `yaml:"normalise_tokens,omitempty"` // DEPRECATED - left for backwards-compatibility
}

// RegisterFlags adds the flags required to config this to the given FlagSet
Expand All @@ -87,8 +83,6 @@ func (cfg *LifecyclerConfig) RegisterFlagsWithPrefix(prefix string, f *flag.Flag
f.DurationVar(&cfg.JoinAfter, prefix+"join-after", 0*time.Second, "Period to wait for a claim from another member; will join automatically after this.")
f.DurationVar(&cfg.ObservePeriod, prefix+"observe-period", 0*time.Second, "Observe tokens after generating to resolve collisions. Useful when using gossiping ring.")
f.DurationVar(&cfg.MinReadyDuration, prefix+"min-ready-duration", 1*time.Minute, "Minimum duration to wait before becoming ready. This is to work around race conditions with ingesters exiting and updating the ring.")
flagext.DeprecatedFlag(f, prefix+"claim-on-rollout", "DEPRECATED. This feature is no longer optional.")
flagext.DeprecatedFlag(f, prefix+"normalise-tokens", "DEPRECATED. This feature is no longer optional.")
f.DurationVar(&cfg.FinalSleep, prefix+"final-sleep", 30*time.Second, "Duration to sleep for before exiting, to ensure metrics are scraped.")
f.StringVar(&cfg.TokensFilePath, prefix+"tokens-file-path", "", "File path where tokens are stored. If empty, tokens are not stored at shutdown and restored at startup.")

Expand Down