From ab0e748bd7cd3058f23b621ced9249e3094a873f Mon Sep 17 00:00:00 2001 From: Allen Zhong Date: Thu, 11 Nov 2021 14:43:06 +0800 Subject: [PATCH] cluster: fix wrong keys detecting host arch (#1610) --- pkg/cluster/manager/manager.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/cluster/manager/manager.go b/pkg/cluster/manager/manager.go index f581a4a9e5..e84fbcaea1 100644 --- a/pkg/cluster/manager/manager.go +++ b/pkg/cluster/manager/manager.go @@ -164,13 +164,13 @@ func (m *Manager) fillHostArch(s, p *tui.SSHConnectionProps, topo spec.Topology, hostArch := map[string]string{} var detectTasks []*task.StepDisplay topo.IterInstance(func(inst spec.Instance) { - if _, ok := hostArch[inst.GetHost()]; ok { + if inst.Arch() != "" { return } - hostArch[inst.GetHost()] = "" - if inst.Arch() != "" { + if _, ok := hostArch[inst.GetHost()]; ok { return } + hostArch[inst.GetHost()] = "" tf := task.NewBuilder(). RootSSH(