Skip to content

Commit 93f2fcd

Browse files
committed
fix(region): add disk change billing type log
1 parent 620fd06 commit 93f2fcd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/compute/tasks/guest_create_disk_task.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,13 +240,13 @@ func (self *ManagedGuestCreateDiskTask) OnManagedDiskPrepared(ctx context.Contex
240240

241241
time.Sleep(time.Second * 5)
242242

243+
log.Debugf("guest %s(%s) billing type: %s disk %s(%s)", guest.Name, guest.Id, guest.BillingType, disk.Name, disk.Id)
244+
243245
if guest.BillingType == billing_api.BILLING_TYPE_PREPAID {
244246
idisk, err := disk.GetIDisk(ctx)
245247
if err != nil {
246-
if errors.Cause(err) != cloudprovider.ErrNotFound {
247-
logclient.AddActionLogWithStartable(self, guest, logclient.ACT_CHANGE_BILLING_TYPE, errors.Wrapf(err, "GetIDisk %s", disk.ExternalId), self.UserCred, false)
248-
continue
249-
}
248+
logclient.AddActionLogWithStartable(self, guest, logclient.ACT_CHANGE_BILLING_TYPE, errors.Wrapf(err, "GetIDisk %s", disk.ExternalId), self.UserCred, false)
249+
continue
250250
}
251251
err = idisk.ChangeBillingType(guest.BillingType)
252252
if err != nil {

0 commit comments

Comments
 (0)