mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 06:09:39 +08:00
Automatic merge from release/2.3.0 -> release/2.4.0
* commit '216e804f5bd28f4863892e7494c3a82dadb89e96': 重置密码时重启机器
This commit is contained in:
@@ -296,10 +296,7 @@ func (self *SGuest) PerformDeploy(ctx context.Context, userCred mcclient.TokenCr
|
||||
return nil, fmt.Errorf("Parse query body error")
|
||||
}
|
||||
|
||||
// 变更密码/密钥时需要Restart才能生效。更新普通字段不需要Restart, Azure需要在运行状态下操作
|
||||
doRestart := false
|
||||
if kwargs.Contains("__delete_keypair__") || kwargs.Contains("keypair") {
|
||||
doRestart = self.GetDriver().IsNeedRestartForResetLoginInfo()
|
||||
var kpId string
|
||||
|
||||
if kwargs.Contains("keypair") {
|
||||
@@ -335,6 +332,12 @@ func (self *SGuest) PerformDeploy(ctx context.Context, userCred mcclient.TokenCr
|
||||
}
|
||||
}
|
||||
|
||||
// 变更密码/密钥时需要Restart才能生效。更新普通字段不需要Restart, Azure需要在运行状态下操作
|
||||
doRestart := false
|
||||
if resetPasswd, _ := kwargs.Bool("reset_password"); resetPasswd {
|
||||
doRestart = self.GetDriver().IsNeedRestartForResetLoginInfo()
|
||||
}
|
||||
|
||||
deployStatus, err := self.GetDriver().GetDeployStatus()
|
||||
if err != nil {
|
||||
return nil, httperrors.NewInputParameterError(err.Error())
|
||||
|
||||
Reference in New Issue
Block a user