mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(region,host): guest save image restart not work
This commit is contained in:
@@ -110,6 +110,10 @@ func (self *DiskSaveTask) OnDiskBackupComplete(ctx context.Context, disk *models
|
||||
if err != nil {
|
||||
self.taskFailed(ctx, disk, errors.Wrapf(err, "UploadDisk"))
|
||||
return
|
||||
} else {
|
||||
// notify guest save image task to resume guest
|
||||
// disk save task waiting for image uploaded to refresh imagecache
|
||||
self.NotifyParentTaskComplete(ctx, jsonutils.NewDict(), false)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -209,7 +209,7 @@ func saveToGlance(ctx context.Context, w http.ResponseWriter, r *http.Request) {
|
||||
DiskInfo: diskInfo.(*jsonutils.JSONDict),
|
||||
}
|
||||
|
||||
hostutils.DelayTaskWithoutReqctx(ctx, storage.SaveToGlance, info)
|
||||
hostutils.DelayTask(ctx, storage.SaveToGlance, info)
|
||||
hostutils.ResponseOk(ctx, w)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user