Merge pull request #12908 from rainzm/automated-cherry-pick-of-#12906-upstream-release-3.7

Automated cherry pick of #12906: fix(region): respect disk's snapshotId in disk_batch_create_task
This commit is contained in:
Zexi Li
2021-12-14 21:24:20 +08:00
committed by GitHub
+1 -1
View File
@@ -171,7 +171,7 @@ func (self *DiskBatchCreateTask) startCreateDisk(ctx context.Context, disk *mode
quotas.CancelPendingUsage(ctx, self.UserCred, &pendingUsage, &quotaStorage, true) // success
self.SetPendingUsage(&pendingUsage, 0)
disk.StartDiskCreateTask(ctx, self.GetUserCred(), false, "", self.GetTaskId())
disk.StartDiskCreateTask(ctx, self.GetUserCred(), false, disk.SnapshotId, self.GetTaskId())
}
func (self *DiskBatchCreateTask) OnScheduleComplete(ctx context.Context, items []db.IStandaloneModel, data *jsonutils.JSONDict) {