Skip to content

Commit

Permalink
fix snapshot clean pending usage
Browse files Browse the repository at this point in the history
  • Loading branch information
wanyaoqi committed Jul 23, 2020
1 parent 18dd47c commit 2c27db4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/compute/tasks/instance_snapshot_and_clone_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/util/qemuimg/qemuimg.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit 2c27db4

Please sign in to comment.