Skip to content

Commit

Permalink
Fix/prometheus wrong data dir (#1040)
Browse files Browse the repository at this point in the history
* playground: don't quote prometheus.tsdb.path

* tests/tiup-playground: add prometheus data dir check
  • Loading branch information
jsvisa authored Jan 5, 2021
1 parent cbc4e18 commit 56d7377
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/playground/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ scrape_configs:
fmt.Sprintf("--config.file=%s", filepath.Join(dir, "prometheus.yml")),
fmt.Sprintf("--web.external-url=http://%s", addr),
fmt.Sprintf("--web.listen-address=%s:%d", host, port),
fmt.Sprintf("--storage.tsdb.path='%s'", filepath.Join(dir, "data")),
fmt.Sprintf("--storage.tsdb.path=%s", filepath.Join(dir, "data")),
}

env := environment.GlobalEnv()
Expand Down
4 changes: 4 additions & 0 deletions tests/tiup-playground/test_playground.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ tiup-playground display | grep -qv "exit"
tiup-playground scale-out --db 2
sleep 5

# ensure prometheus/data dir exists,
# fix https://github.com/pingcap/tiup/issues/1039
ls "${TIUP_HOME}/data/test_play/prometheus/data"

# 1(init) + 2(scale-out)
check_tidb_num 3

Expand Down

0 comments on commit 56d7377

Please sign in to comment.