Skip to content

Commit

Permalink
fix(region): not sync status when attaching and detaching disk (#21606)
Browse files Browse the repository at this point in the history
  • Loading branch information
zexi authored Nov 14, 2024
1 parent 283cde5 commit e5d2380
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/compute/guestdrivers/kvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ func (self *SKVMGuestDriver) RequestDetachDisk(ctx context.Context, guest *model
}

func (self *SKVMGuestDriver) RequestAttachDisk(ctx context.Context, guest *models.SGuest, disk *models.SDisk, task taskman.ITask) error {
return guest.StartSyncTask(
return guest.StartSyncTaskWithoutSyncstatus(
ctx,
task.GetUserCred(),
jsonutils.QueryBoolean(task.GetParams(), "sync_desc_only", false),
Expand Down
2 changes: 1 addition & 1 deletion pkg/compute/tasks/guest_detach_disk_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (self *GuestDetachDiskTask) OnGetGuestStatus(ctx context.Context, guest *mo
}

self.SetStage("OnDetachDiskComplete", nil)
if err := guest.StartSyncTask(
if err := guest.StartSyncTaskWithoutSyncstatus(
ctx, self.GetUserCred(), jsonutils.QueryBoolean(self.GetParams(), "sync_desc_only", false), self.GetTaskId(),
); err != nil {
self.OnDetachDiskCompleteFailed(ctx, guest, jsonutils.NewString(err.Error()))
Expand Down

0 comments on commit e5d2380

Please # to comment.