From 8fdff789d20d82cc8fc3017f094bf7587c131b83 Mon Sep 17 00:00:00 2001 From: Allen Zhong Date: Thu, 4 Nov 2021 17:24:49 +0800 Subject: [PATCH] cluster: fix wrong keys detecting host arch --- 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(