Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add efficient volume cloning support #100

Open
nixpanic opened this issue Nov 15, 2018 · 4 comments
Open

Add efficient volume cloning support #100

nixpanic opened this issue Nov 15, 2018 · 4 comments
Assignees
Labels

Comments

@nixpanic
Copy link
Member

Describe the feature you'd like to have.
Support for the new CLONE_VOLUME operation, which can take a VolumeSource (not snapshot) as origin to clone. This will be used by kubevirt/cdi.

What is the value to the end user? (why is it a priority?)
Efficient cloning is an important feature for KuneVirt, and we would like Gluster to be one of the commonly used storage backends.

How will we know we have a good solution? (acceptance criteria)
Standard CSI CLONE_VOLUME requests should be handled correctly.

@humblec
Copy link
Contributor

humblec commented Nov 23, 2018

/assign @humblec

@humblec humblec self-assigned this Nov 23, 2018
humblec added a commit to humblec/gluster-csi-driver that referenced this issue Nov 26, 2018
This patch add support for cloning functionality
in glusterfs CSI driver when volumesource is filled
in the request.

Fix: gluster#100

Signed-off-by: Madhu Rajanna <[email protected]>
Signed-off-by: Humble Chirammal <[email protected]>
@Madhu-1
Copy link
Member

Madhu-1 commented Nov 28, 2018

@nixpanic the data source is added for the spec, I don't see a code changes in the external-provisioner

This is the template i used for testing, am i missing anything here?

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: glusterfs-pv-restore
spec:
  storageClassName: glusterfs-csi
  dataSource:
    name: gcs-example-volume
    kind: VolumeSource
    apiGroup: snapshot.storage.k8s.io 
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 5Gi

[root@master ~]# kubectl create -f vol-csi.yaml The PersistentVolumeClaim "glusterfs-pv-restore" is invalid: spec.dataSource: Unsupported value: "VolumeContentSource.snapshot.storage.k8s.io": supported values: "VolumeSnapshot.snapshot.storage.k8s.io" [root@master ~]# vi vol-csi.yaml [root@master ~]# kubectl create -f vol-csi.yaml The PersistentVolumeClaim "glusterfs-pv-restore" is invalid: spec.dataSource: Unsupported value: "VolumeSource.snapshot.storage.k8s.io": supported values: "VolumeSnapshot.snapshot.storage.k8s.io"

[root@master ~]# kubectl explain pvc.spec.dataSource
KIND:     PersistentVolumeClaim
VERSION:  v1

RESOURCE: dataSource <Object>

DESCRIPTION:
     This field requires the VolumeSnapshotDataSource alpha feature gate to be
     enabled and currently VolumeSnapshot is the only supported data source. If
     the provisioner can support VolumeSnapshot data source, it will create a
     new volume and data will be restored to the volume at the same time. If the
     provisioner does not support VolumeSnapshot data source, volume will not be
     created and the failure will be reported as an event. In the future, we
     plan to support more data source types and the behavior of the provisioner
     may change.

     TypedLocalObjectReference contains enough information to let you locate the
     typed referenced object inside the same namespace.

FIELDS:
   apiGroup	<string>
     APIGroup is the group for the resource being referenced. If APIGroup is not
     specified, the specified Kind must be in the core API group. For any other
     third-party types, APIGroup is required.

   kind	<string> -required-
     Kind is the type of resource being referenced

   name	<string> -required-
     Name is the name of resource being referenced

kubernetes used for testing
[root@master ~]# kubectl version Client Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.0-beta.2", GitCommit:"a4ff09c41589c48547e04f85391aa5610ebe0e17", GitTreeState:"clean", BuildDate:"2018-11-23T00:55:34Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.0-beta.2", GitCommit:"a4ff09c41589c48547e04f85391aa5610ebe0e17", GitTreeState:"clean", BuildDate:"2018-11-23T00:47:47Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"}

@humblec
Copy link
Contributor

humblec commented Nov 28, 2018

Thanks @Madhu-1 , I have opened an issue in external attacher repo kubernetes-csi/external-provisioner#172

@Madhu-1 Madhu-1 removed the GCS/0.4 label Dec 5, 2018
@Madhu-1
Copy link
Member

Madhu-1 commented Dec 5, 2018

moved out of GCS/0.4 as this cannot be completed as we need smart cloning support in sidecar containers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants