Skip to content

Commit 996096a

Browse files
committed
fix: poll the VM Operations API instead of the Disk Operations API for disk actions
1 parent bba72ae commit 996096a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/controller/controller.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ func (d *DefaultController) ControllerPublishVolume(ctx context.Context,
214214
_, err = common.AwaitOperation(ctx,
215215
op.Operation,
216216
d.HostInstance.ProjectId,
217-
d.CrusoeClient.DiskOperationsApi.GetStorageDisksOperation)
217+
d.CrusoeClient.VMOperationsApi.GetComputeVMsInstancesOperation)
218218
if err != nil {
219219
return nil, status.Errorf(codes.Internal, "failed to get result of disk attachment: %s", err)
220220
}
@@ -262,7 +262,7 @@ func (d *DefaultController) ControllerUnpublishVolume(ctx context.Context,
262262
_, err = common.AwaitOperation(ctx,
263263
op.Operation,
264264
d.HostInstance.ProjectId,
265-
d.CrusoeClient.DiskOperationsApi.GetStorageDisksOperation)
265+
d.CrusoeClient.VMOperationsApi.GetComputeVMsInstancesOperation)
266266
if err != nil {
267267
return nil, status.Errorf(codes.Internal, "failed to get result of disk detachment: %s", err)
268268
}

0 commit comments

Comments
 (0)