diff --git a/pkg/cluster/manager/builder.go b/pkg/cluster/manager/builder.go index ea3b05d147..52cd10cac4 100644 --- a/pkg/cluster/manager/builder.go +++ b/pkg/cluster/manager/builder.go @@ -457,7 +457,7 @@ func buildRefreshMonitoredConfigTasks( return tasks } -func buildRegenConfigTasks(m *Manager, name string, topo spec.Topology, base *spec.BaseMeta, nodes []string) ([]*task.StepDisplay, bool) { +func buildRegenConfigTasks(m *Manager, name string, topo spec.Topology, base *spec.BaseMeta, nodes []string, ignoreCheck bool) ([]*task.StepDisplay, bool) { var tasks []*task.StepDisplay hasImported := false deletedNodes := set.NewStringSet(nodes...) @@ -500,7 +500,7 @@ func buildRegenConfigTasks(m *Manager, name string, topo spec.Topology, base *sp m.specManager, instance, base.User, - true, // always ignore config check result in scale in + ignoreCheck, meta.DirPaths{ Deploy: deployDir, Data: dataDirs, diff --git a/pkg/cluster/manager/destroy.go b/pkg/cluster/manager/destroy.go index d1b648bfe1..d6fe623aac 100644 --- a/pkg/cluster/manager/destroy.go +++ b/pkg/cluster/manager/destroy.go @@ -138,7 +138,7 @@ func (m *Manager) DestroyTombstone( UpdateMeta(name, clusterMeta, nodes). UpdateTopology(name, m.specManager.Path(name), clusterMeta, nodes) - regenConfigTasks, _ := buildRegenConfigTasks(m, name, topo, base, nodes) + regenConfigTasks, _ := buildRegenConfigTasks(m, name, topo, base, nodes, true) t := b. ParallelStep("+ Refresh instance configs", true, regenConfigTasks...). Parallel(true, buildReloadPromTasks(metadata.GetTopology())...). diff --git a/pkg/cluster/manager/reload.go b/pkg/cluster/manager/reload.go index 22867346bb..ab3291b327 100644 --- a/pkg/cluster/manager/reload.go +++ b/pkg/cluster/manager/reload.go @@ -52,7 +52,7 @@ func (m *Manager) Reload(name string, opt operator.Options, skipRestart bool) er } }) - refreshConfigTasks, hasImported := buildRegenConfigTasks(m, name, topo, base, nil) + refreshConfigTasks, hasImported := buildRegenConfigTasks(m, name, topo, base, nil, false) monitorConfigTasks := buildRefreshMonitoredConfigTasks( m.specManager, name, diff --git a/pkg/cluster/manager/scale_in.go b/pkg/cluster/manager/scale_in.go index 972eae07d7..0c66bf36ad 100644 --- a/pkg/cluster/manager/scale_in.go +++ b/pkg/cluster/manager/scale_in.go @@ -79,7 +79,7 @@ func (m *Manager) ScaleIn( base := metadata.GetBaseMeta() // Regenerate configuration - regenConfigTasks, hasImported := buildRegenConfigTasks(m, name, topo, base, nodes) + regenConfigTasks, hasImported := buildRegenConfigTasks(m, name, topo, base, nodes, true) // handle dir scheme changes if hasImported {