mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-08-29 03:51:54 +08:00
fix snapshot clean pending usage
This commit is contained in:
@@ -74,7 +74,7 @@ func (self *InstanceSnapshotAndCloneTask) finalReleasePendingUsage(ctx context.C
|
||||
pendingRegionUsage := models.SRegionQuota{}
|
||||
err = self.GetPendingUsage(&pendingRegionUsage, 1)
|
||||
if err == nil && !pendingRegionUsage.IsEmpty() {
|
||||
quotas.CancelPendingUsage(ctx, self.UserCred, &pendingUsage, &pendingUsage, false) // failure cleanup
|
||||
quotas.CancelPendingUsage(ctx, self.UserCred, &pendingRegionUsage, &pendingRegionUsage, false) // failure cleanup
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -447,7 +447,7 @@ func (img *SQemuImage) create(sizeMB int, format TImageFormat, options []string)
|
||||
output, err := cmd.Output()
|
||||
if err != nil {
|
||||
log.Errorf("%v create error %s %s", args, output, err)
|
||||
return err
|
||||
return errors.Wrapf(err, "create image failed: %s", output)
|
||||
}
|
||||
return img.parse()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user