Skip to content

Commit

Permalink
fix fillHostArchOrOS not working when using Identity (#1914)
Browse files Browse the repository at this point in the history
  • Loading branch information
srstack authored Jun 9, 2022
1 parent 16c5f6b commit 7b32405
Showing 1 changed file with 20 additions and 23 deletions.
43 changes: 20 additions & 23 deletions pkg/cluster/manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,29 +195,26 @@ func (m *Manager) fillHostArchOrOS(s, p *tui.SSHConnectionProps, topo spec.Topol
}
hostArchOrOS[inst.GetHost()] = ""

tf := task.NewSimpleUerSSH(m.logger, inst.GetHost(), inst.GetSSHPort(), user, *gOpt, p, globalSSHType)
if s.Password != "" || user == "root" {
tf = task.NewBuilder(m.logger).
RootSSH(
inst.GetHost(),
inst.GetSSHPort(),
user,
s.Password,
s.IdentityFile,
s.IdentityFilePassphrase,
gOpt.SSHTimeout,
gOpt.OptTimeout,
gOpt.SSHProxyHost,
gOpt.SSHProxyPort,
gOpt.SSHProxyUser,
p.Password,
p.IdentityFile,
p.IdentityFilePassphrase,
gOpt.SSHProxyTimeout,
gOpt.SSHType,
globalSSHType,
)
}
tf := task.NewBuilder(m.logger).
RootSSH(
inst.GetHost(),
inst.GetSSHPort(),
user,
s.Password,
s.IdentityFile,
s.IdentityFilePassphrase,
gOpt.SSHTimeout,
gOpt.OptTimeout,
gOpt.SSHProxyHost,
gOpt.SSHProxyPort,
gOpt.SSHProxyUser,
p.Password,
p.IdentityFile,
p.IdentityFilePassphrase,
gOpt.SSHProxyTimeout,
gOpt.SSHType,
globalSSHType,
)

switch fullType {
case spec.FullOSType:
Expand Down

0 comments on commit 7b32405

Please sign in to comment.