Merge pull request #17162 from ioito/hotfix/qx-node-pool-keypair

fix(region): node pool keypair
This commit is contained in:
Zexi Li
2023-05-26 15:09:30 +08:00
committed by GitHub
2 changed files with 4 additions and 1 deletions
@@ -3214,6 +3214,8 @@ func (self *SManagedVirtualizationRegionDriver) RequestCreateKubeNodePool(ctx co
NetworkIds: []string{},
InstanceTypes: []string{},
}
opts.PublicKey, _ = task.GetParams().GetString("public_key")
if pool.InstanceTypes != nil {
for _, instanceType := range *pool.InstanceTypes {
opts.InstanceTypes = append(opts.InstanceTypes, instanceType)
+2 -1
View File
@@ -63,7 +63,8 @@ func (self *GuestSaveImageTask) OnStopServerCompleteFailed(ctx context.Context,
func (self *GuestSaveImageTask) OnSaveRootImageComplete(ctx context.Context, guest *models.SGuest, data jsonutils.JSONObject) {
restart := jsonutils.QueryBoolean(self.Params, "restart", false)
if restart {
autoStart := jsonutils.QueryBoolean(self.Params, "auto_start", false)
if restart || autoStart {
self.SetStage("OnStartServerComplete", nil)
guest.StartGueststartTask(ctx, self.GetUserCred(), nil, self.GetTaskId())
return