diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index ec12f35b..c1ddadf6 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -111,7 +111,7 @@ func (controller *Controller) ControllerGetCapabilities(ctx context.Context, req csi.ControllerServiceCapability_RPC_PUBLISH_UNPUBLISH_VOLUME, csi.ControllerServiceCapability_RPC_CREATE_DELETE_SNAPSHOT, csi.ControllerServiceCapability_RPC_LIST_SNAPSHOTS, - // csi.ControllerServiceCapability_RPC_CLONE_VOLUME, + csi.ControllerServiceCapability_RPC_CLONE_VOLUME, csi.ControllerServiceCapability_RPC_EXPAND_VOLUME, } diff --git a/pkg/controller/provisioner.go b/pkg/controller/provisioner.go index fe22bcf0..71f3c00b 100644 --- a/pkg/controller/provisioner.go +++ b/pkg/controller/provisioner.go @@ -71,12 +71,12 @@ func (controller *Controller) CreateVolume(ctx context.Context, req *csi.CreateV } if sourceID != "" { - controller.dothillClient.VolumeCopy(sourceID, volumeID, parameters[common.PoolConfigKey]) + _, _, err = controller.dothillClient.CopyVolume(sourceID, volumeID, parameters[common.PoolConfigKey]) } else { _, _, err = controller.dothillClient.CreateVolume(volumeID, sizeStr, parameters[common.PoolConfigKey]) - if err != nil { - return nil, err - } + } + if err != nil { + return nil, err } }