Skip to content

Commit

Permalink
Ruler: Fix WAL directory in stateless mode (#5242)
Browse files Browse the repository at this point in the history
  • Loading branch information
matej-g committed Mar 18, 2022
1 parent 72d63e3 commit cb96cf9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -12,6 +12,8 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re

### Fixed

- [#5242](https://github.com/thanos-io/thanos/pull/5242) Ruler: Make ruler use the correct WAL directory.

### Added

- [#5220](https://github.com/thanos-io/thanos/pull/5220) Query Frontend: Add `--query-frontend.forward-header` flag, forward headers to downstream querier.
Expand Down
5 changes: 2 additions & 3 deletions cmd/thanos/rule.go
Expand Up @@ -357,11 +357,10 @@ func runRule(
return errors.Wrapf(err, "failed to parse remote write config %v", string(rwCfgYAML))
}

walDir := filepath.Join(conf.dataDir, "wal")
// flushDeadline is set to 1m, but it is for metadata watcher only so not used here.
remoteStore := remote.NewStorage(logger, reg, func() (int64, error) {
return 0, nil
}, walDir, 1*time.Minute, nil)
}, conf.dataDir, 1*time.Minute, nil)
if err := remoteStore.ApplyConfig(&config.Config{
GlobalConfig: config.GlobalConfig{
ExternalLabels: labelsTSDBToProm(conf.lset),
Expand All @@ -371,7 +370,7 @@ func runRule(
return errors.Wrap(err, "applying config to remote storage")
}

agentDB, err = agent.Open(logger, reg, remoteStore, walDir, agentOpts)
agentDB, err = agent.Open(logger, reg, remoteStore, conf.dataDir, agentOpts)
if err != nil {
return errors.Wrap(err, "start remote write agent db")
}
Expand Down

0 comments on commit cb96cf9

Please sign in to comment.