mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-05 01:20:25 +08:00
完全没有设置过SSH登录参数的节点也可以远程安装
This commit is contained in:
@@ -94,14 +94,16 @@ func (this *NodeQueue) InstallNode(nodeId int64, installStatus *models.NodeInsta
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if login == nil {
|
||||
installStatus.ErrorCode = "EMPTY_LOGIN"
|
||||
return errors.New("can not find node login information")
|
||||
}
|
||||
loginParams, err := login.DecodeSSHParams()
|
||||
var loginParams = &models.NodeLoginSSHParams{}
|
||||
if login != nil {
|
||||
sshLoginParams, err := login.DecodeSSHParams()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if sshLoginParams != nil {
|
||||
loginParams = sshLoginParams
|
||||
}
|
||||
}
|
||||
|
||||
if len(loginParams.Host) == 0 {
|
||||
// 查询节点IP
|
||||
|
||||
Reference in New Issue
Block a user