Skip to content

Commit

Permalink
cluster: skip updating topology when reload with --skip-restart (#1513)
Browse files Browse the repository at this point in the history
  • Loading branch information
AstroProfundis committed Aug 19, 2021
1 parent b629670 commit 416deac
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/cluster/manager/reload.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (m *Manager) Reload(name string, opt operator.Options, skipRestart, skipCon
}

tb := m.sshTaskBuilder(name, topo, base.User, opt)
if topo.Type() == spec.TopoTypeTiDB {
if topo.Type() == spec.TopoTypeTiDB && !skipRestart {
tb = tb.UpdateTopology(
name,
m.specManager.Path(name),
Expand All @@ -101,11 +101,11 @@ func (m *Manager) Reload(name string, opt operator.Options, skipRestart, skipCon
tb = tb.ParallelStep("+ Refresh monitor configs", opt.Force, monitorConfigTasks...)
}

tlsCfg, err := topo.TLSConfig(m.specManager.Path(name, spec.TLSCertKeyDir))
if err != nil {
return err
}
if !skipRestart {
tlsCfg, err := topo.TLSConfig(m.specManager.Path(name, spec.TLSCertKeyDir))
if err != nil {
return err
}
tb = tb.Func("UpgradeCluster", func(ctx context.Context) error {
return operator.Upgrade(ctx, topo, opt, tlsCfg)
})
Expand Down

0 comments on commit 416deac

Please sign in to comment.