Skip to content

Commit

Permalink
Merge 65ffd2f into 7fbbbd5
Browse files Browse the repository at this point in the history
  • Loading branch information
nexustar authored Aug 9, 2022
2 parents 7fbbbd5 + 65ffd2f commit d2e9fa2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/cluster/manager/transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (m *Manager) Transfer(name string, opt TransferOptions, gOpt operator.Optio

uniqueHosts := map[string]set.StringSet{} // host-sshPort -> {remote-path}
topo.IterInstance(func(inst spec.Instance) {
key := fmt.Sprintf("%s-%d", inst.GetHost(), inst.GetSSHPort())
key := fmt.Sprintf("%d-%s", inst.GetSSHPort(), inst.GetHost())
if _, found := uniqueHosts[key]; !found {
if len(gOpt.Roles) > 0 && !filterRoles.Exist(inst.Role()) {
return
Expand Down Expand Up @@ -91,7 +91,7 @@ func (m *Manager) Transfer(name string, opt TransferOptions, gOpt operator.Optio

srcPath := opt.Local
for hostKey, i := range uniqueHosts {
host := strings.Split(hostKey, "-")[0]
host := hostKey[len(strings.Split(hostKey, "-")[0])+1:]
for _, p := range i.Slice() {
t := task.NewBuilder(m.logger)
if opt.Pull {
Expand Down

0 comments on commit d2e9fa2

Please sign in to comment.