Skip to content
Snippets Groups Projects
Unverified Commit 65b01af5 authored by Zexi Li's avatar Zexi Li Committed by GitHub
Browse files

Merge pull request #14353 from ioito/automated-cherry-pick-of-#14351-upstream-release-3.8

Automated cherry pick of #14351: fix(region): aliyun disk external id
parents 668cc71e 837f40a3
No related branches found
No related tags found
No related merge requests found
......@@ -994,11 +994,10 @@ func (self *SManagedVirtualizedGuestDriver) OnGuestDeployTaskDataReceived(ctx co
disks, _ := guest.GetGuestDisks()
if len(disks) != len(diskInfo) {
msg := fmt.Sprintf("inconsistent disk number: guest have %d disks, data contains %d disks", len(disks), len(diskInfo))
log.Errorf(msg)
return fmt.Errorf(msg)
// 公有云镜像可能包含数据盘, 若忽略设置磁盘的external id, 会导致部分磁盘状态异常
log.Warningf("inconsistent disk number: guest have %d disks, data contains %d disks", len(disks), len(diskInfo))
}
for i := 0; i < len(diskInfo); i += 1 {
for i := 0; i < len(diskInfo) && i < len(disks); i += 1 {
disk := disks[i].GetDisk()
_, err = db.Update(disk, func() error {
disk.DiskSize = diskInfo[i].Size
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment