fix(region): cloudpods userdata (#18118)

This commit is contained in:
屈轩
2023-09-21 20:49:32 +08:00
committed by GitHub
parent 3c14711346
commit 7c62173d3f
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -92,6 +92,10 @@ func (self *SCloudpodsGuestDriver) IsSupportLiveMigrate() bool {
return true
}
func (self *SCloudpodsGuestDriver) GetUserDataType() string {
return cloudprovider.CLOUD_SHELL_WITHOUT_ENCRYPT
}
func (self *SCloudpodsGuestDriver) ValidateResizeDisk(guest *models.SGuest, disk *models.SDisk, storage *models.SStorage) error {
if guest.GetDiskIndex(disk.Id) <= 0 && guest.Status == api.VM_RUNNING {
return httperrors.NewUnsupportOperationError("Cann't online resize root disk")
+1 -1
View File
@@ -743,7 +743,7 @@ func (manager *SServerSkuManager) ListItemFilter(
}
if domainStr := query.ProjectDomainId; len(domainStr) > 0 {
domain, err := db.TenantCacheManager.FetchDomainByIdOrName(context.Background(), domainStr)
domain, err := db.TenantCacheManager.FetchDomainByIdOrName(ctx, domainStr)
if err != nil {
if errors.Cause(err) == sql.ErrNoRows {
return nil, httperrors.NewResourceNotFoundError2("domains", domainStr)