Skip to content

Commit

Permalink
adjust outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
AstroProfundis committed Dec 29, 2021
1 parent 679c07d commit 3e9e141
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
3 changes: 2 additions & 1 deletion components/cluster/command/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ func newStartCmd() *cobra.Command {
log.Errorf("failed to set root password of TiDB database to '%s'", pwd)
return err
}
log.Warnf("The root password of TiDB database has been changed to '%s'.", color.HiYellowString(pwd))
log.Warnf("The root password of TiDB database has been changed.")
fmt.Printf("The new password is: '%s'.", color.HiYellowString(pwd)) // use fmt to avoid printing to audit log
log.Warnf("Copy and record it to somewhere safe, %s, and will not be stored.", color.HiRedString("it is only displayed once"))
log.Warnf("The generated password %s.", color.HiRedString("could NOT be get and shown again"))
}
Expand Down
7 changes: 1 addition & 6 deletions pkg/cluster/spec/tidb.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,6 @@ func (i *TiDBInstance) InitConfig(

enableTLS := topo.GlobalOptions.TLSEnabled
spec := i.InstanceSpec.(*TiDBSpec)
// check if the tidb version has --initialize-insecure support
hasSecbootSupport := false
if vc := semver.Compare(clusterVersion, "v5.3.0"); vc >= 0 {
hasSecbootSupport = true
}
cfg := scripts.
NewTiDBScript(i.GetHost(), paths.Deploy, paths.Log).
WithPort(spec.Port).
Expand All @@ -151,7 +146,7 @@ func (i *TiDBInstance) InitConfig(
AppendEndpoints(topo.Endpoints(deployUser)...).
WithListenHost(i.GetListenHost()).
WithAdvertiseAddr(spec.Host).
SupportSecureBootstrap(hasSecbootSupport)
SupportSecureBootstrap(semver.Compare(clusterVersion, "v5.3.0") >= 0)
fp := filepath.Join(paths.Cache, fmt.Sprintf("run_tidb_%s_%d.sh", i.GetHost(), i.GetPort()))
if err := cfg.ConfigToFile(fp); err != nil {
return err
Expand Down

0 comments on commit 3e9e141

Please sign in to comment.