From eb01edea010d6ca7d71a98f68742178f2fc0ebb9 Mon Sep 17 00:00:00 2001 From: nexustar Date: Mon, 21 Feb 2022 13:55:42 +0800 Subject: [PATCH] cluster: fix ngm nightly not start by default (#1760) --- pkg/cluster/spec/spec.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/cluster/spec/spec.go b/pkg/cluster/spec/spec.go index 9407dcde30..48cfff052a 100644 --- a/pkg/cluster/spec/spec.go +++ b/pkg/cluster/spec/spec.go @@ -31,6 +31,7 @@ import ( "github.com/pingcap/tiup/pkg/meta" "github.com/pingcap/tiup/pkg/proxy" "github.com/pingcap/tiup/pkg/tui" + "github.com/pingcap/tiup/pkg/utils" clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/zap" "golang.org/x/mod/semver" @@ -416,7 +417,7 @@ func (s *Specification) AdjustByVersion(clusterVersion string) { server.DataDir = "" } } - if semver.Compare(clusterVersion, "v5.4.0") >= 0 { + if semver.Compare(clusterVersion, "v5.4.0") >= 0 || strings.Contains(clusterVersion, utils.NightlyVersionAlias) { for _, m := range s.Monitors { if m.NgPort == 0 { m.NgPort = 12020