From 70402bada86cd79bb9dbdb02b5082ace4f527fa7 Mon Sep 17 00:00:00 2001 From: lucklove Date: Tue, 1 Sep 2020 17:37:03 +0800 Subject: [PATCH] Bugfix: cleanup wrong conf files Fix https://github.com/pingcap/tiup/issues/736 Signed-off-by: lucklove --- pkg/cluster/spec/prometheus.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cluster/spec/prometheus.go b/pkg/cluster/spec/prometheus.go index 6d51836360..a88b6934cc 100644 --- a/pkg/cluster/spec/prometheus.go +++ b/pkg/cluster/spec/prometheus.go @@ -202,7 +202,7 @@ func (i *MonitorInstance) InitConfig(e executor.Executor, clusterName, clusterVe func (i *MonitorInstance) initRules(e executor.Executor, spec PrometheusSpec, paths meta.DirPaths) error { // To make this step idempotent, we need cleanup old rules first - if _, _, err := e.Execute(fmt.Sprintf("rm -f %s/*", path.Join(paths.Deploy, "conf")), false); err != nil { + if _, _, err := e.Execute(fmt.Sprintf("rm -f %s/*.rules.yml", path.Join(paths.Deploy, "conf")), false); err != nil { return err }