Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Automated cherry pick of #21602: fix(region): not sync status when attaching and detaching disk #21606

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading