mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #680 in YUNIONIO/onecloud from ~QUXUAN/onecloud:hotfix/qx-qcloud-disk-resize to release/2.3.0
* commit '099c4fe020d3cc6cf4a27671f65e1b94be245793': 腾讯云不允许扩容系统盘
This commit is contained in:
@@ -75,6 +75,9 @@ func (self *SQcloudGuestDriver) ValidateResizeDisk(guest *models.SGuest, disk *m
|
||||
if !utils.IsInStringArray(guest.Status, []string{models.VM_READY, models.VM_RUNNING}) {
|
||||
return fmt.Errorf("Cannot resize disk when guest in status %s", guest.Status)
|
||||
}
|
||||
if disk.DiskType == models.DISK_TYPE_SYS {
|
||||
return fmt.Errorf("Cannot resize system disk")
|
||||
}
|
||||
if utils.IsInStringArray(storage.StorageType, []string{models.STORAGE_LOCAL_BASIC, models.STORAGE_LOCAL_SSD}) {
|
||||
return fmt.Errorf("Cannot resize %s disk", storage.StorageType)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user