Skip to content

Commit

Permalink
Merge branch 'master' into more_auto_completion
Browse files Browse the repository at this point in the history
  • Loading branch information
AstroProfundis authored May 25, 2022
2 parents 2723be5 + fd85680 commit 387c964
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 12 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
TiUP Changelog

## [1.9.6] 2022-05-20

### Fix

- Fix incorrect output of `display` in certain circumstances for `tiup-cluster` ([#1889](https://github.com/pingcap/tiup/pull/1889), [@srstack](https://github.com/srstack))

## [1.9.5] 2022-05-10

### Fixes
Expand Down
3 changes: 0 additions & 3 deletions embed/examples/dm/minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ monitoring_servers:

grafana_servers:
- host: 172.19.0.101
# config: # Enable this part if you want to use WebUI, make sure tiup dm -v newer than v1.9.0.
# auth.anonymous.enabled: true
# security.allow_embedding: true

alertmanager_servers:
- host: 172.19.0.101
3 changes: 0 additions & 3 deletions embed/examples/dm/topology.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ grafana_servers:
# deploy_dir: /tidb-deploy/grafana-3000
# grafana dashboard dir on TiUP machine
# dashboard_dir: /home/tidb/dashboards
# config: # Enable this part if you want to use WebUI, make sure tiup dm -v newer than v1.9.0.
# auth.anonymous.enabled: true
# security.allow_embedding: true

alertmanager_servers:
- host: 10.0.1.15
Expand Down
4 changes: 2 additions & 2 deletions pkg/cluster/manager/display.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,13 +494,13 @@ func (m *Manager) GetClusterTopology(name string, opt operator.Options) ([]InstI
}

status := ins.Status(ctx, statusTimeout, tlsCfg, masterList...)
mu.Lock()
if strings.HasPrefix(status, "Up") || strings.HasPrefix(status, "Healthy") {
instAddr := fmt.Sprintf("%s:%d", ins.GetHost(), ins.GetPort())
mu.Lock()
masterActive = append(masterActive, instAddr)
mu.Unlock()
}
masterStatus[ins.ID()] = status
mu.Unlock()
}, opt.Concurrency)

var dashboardAddr string
Expand Down
10 changes: 10 additions & 0 deletions pkg/cluster/operation/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,16 @@ func checkOSInfo(opt *CheckOptions, osInfo *sysinfo.OS) *CheckResult {

// check OS vendor
switch osInfo.Vendor {
case "kylin":
msg := "kylin support is not fully tested, be careful"
result.Err = fmt.Errorf("%s (%s)", result.Msg, msg)
result.Warn = true
// VERSION_ID="V10"
if ver, _ := strconv.ParseFloat(strings.Trim(osInfo.Version, "V"), 64); ver < 10 {
result.Err = fmt.Errorf("%s %s not supported, use version V10 or higher(%s)",
osInfo.Name, osInfo.Release, msg)
return result
}
case "amzn":
// Amazon Linux 2 is based on CentOS 7 and is recommended for
// AWS Graviton 2 (ARM64) deployments.
Expand Down
11 changes: 8 additions & 3 deletions pkg/cluster/spec/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,19 @@ var initialized = false
// The directory will be created before return if it does not already exist.
func Initialize(base string) error {
tiupData := os.Getenv(tiuplocaldata.EnvNameComponentDataDir)
if tiupData == "" {
tiupHome := os.Getenv(tiuplocaldata.EnvNameHome)

switch {
case tiupData != "":
profileDir = tiupData
case tiupHome != "":
profileDir = path.Join(tiupHome, tiuplocaldata.StorageParentDir, base)
default:
homeDir, err := getHomeDir()
if err != nil {
return errors.Trace(err)
}
profileDir = path.Join(homeDir, ".tiup", tiuplocaldata.StorageParentDir, base)
} else {
profileDir = tiupData
}

clusterBaseDir := filepath.Join(profileDir, TiUPClusterDir)
Expand Down
2 changes: 1 addition & 1 deletion pkg/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var (
// TiUPVerMinor is the minor version of TiUP
TiUPVerMinor = 9
// TiUPVerPatch is the patch version of TiUP
TiUPVerPatch = 5
TiUPVerPatch = 6
// TiUPVerName is an alternative name of the version
TiUPVerName = "tiup"
// GitHash is the current git commit hash
Expand Down

0 comments on commit 387c964

Please sign in to comment.