Skip to content

Commit

Permalink
cluster: fix mistake error about TLS (#1612)
Browse files Browse the repository at this point in the history
  • Loading branch information
nexustar authored Nov 9, 2021
1 parent 440fe98 commit 109ebff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pkg/cluster/manager/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ func (m *Manager) Deploy(
return err
}
if clusterSpec, ok := topo.(*spec.Specification); ok {
if semver.Compare(clusterVersion, "v4.0.5") < 0 &&
if clusterSpec.GlobalOptions.TLSEnabled &&
semver.Compare(clusterVersion, "v4.0.5") < 0 &&
len(clusterSpec.TiFlashServers) > 0 {
return fmt.Errorf("TiFlash %s is not supported in TLS enabled cluster", clusterVersion)
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/cluster/manager/scale_out.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ func (m *Manager) ScaleOut(
}

if clusterSpec, ok := topo.(*spec.Specification); ok {
if semver.Compare(base.Version, "v4.0.5") < 0 &&
if clusterSpec.GlobalOptions.TLSEnabled &&
semver.Compare(base.Version, "v4.0.5") < 0 &&
len(clusterSpec.TiFlashServers) > 0 {
return fmt.Errorf("TiFlash %s is not supported in TLS enabled cluster", base.Version)
}
Expand Down

0 comments on commit 109ebff

Please sign in to comment.