Skip to content

Commit

Permalink
fix(region): not sync status when attaching and detaching disk (#21602)
Browse files Browse the repository at this point in the history
  • Loading branch information
zexi authored Nov 14, 2024
1 parent af51bfc commit 2e1d866
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 @@ -499,7 +499,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 @@ -95,7 +95,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 2e1d866

Please sign in to comment.