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 snapshot examples in CSI-v1.0 #170

Merged
merged 1 commit into from
Feb 6, 2019
Merged

Conversation

rollandf
Copy link
Contributor

@rollandf rollandf commented Feb 5, 2019

Fixes issue #174


## How to test RBD Snapshot feature

Before continuing, make sure you enabled the required [feature gate](https://kubernetes-csi.github.io/docs/Setup.html#csi-volume-snapshot-support) in your Kubernetes cluster.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the doc still points to kube1.12, as only one feature gate needs to be enabled, instead of the link we can add
--feature-gates=VolumeSnapshotDataSource=true here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


```bash
kubectl create -f snapshotclass.yaml
kubectl create -f snapshot.yaml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need some explanation for kubectl create -f snapshot.yaml, this creates the snapshot from existing PVC.

we can do like below

kubectl create -f snapshotclass.yaml

verify snashot class

kubectl get volumesnapshotclass
NAME                      AGE
csi-rbdplugin-snapclass   4s
  • create a snapshot from the existing PVC
kubectl create -f snapshot.yaml
  • verify snapshot state
kubectl get volumesnapshot
NAME               AGE
rbd-pvc-snapshot   6s

even we can discribe and show that the snapshot is in ready state

To be sure everything is OK you can run rbd snap ls [your-pvc-name] inside one of your Ceph pod.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Verify that the snapshot class was created:

```bash
kubectl get volumesnapshotclass
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ is missing here

@rollandf rollandf force-pushed the csi-v1.0 branch 2 times, most recently from b795b38 to c12d32e Compare February 6, 2019 09:00

## How to test RBD Snapshot feature

Before continuing, make sure you enabled the required feature gate 'VolumeSnapshotDataSource=true' in your Kubernetes cluster.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'VolumeSnapshotDataSource=true' to VolumeSnapshotDataSource=true

Create a snapshot from the existing PVC:

```bash
$ kubectl create -f snapshot.yaml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check #174 (comment), I think we need to remove $ in case of no output

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want this output?

volumesnapshotclass.snapshot.storage.k8s.io/csi-rbdplugin-snapclass created

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have 2 options

$ kubectl create -f snapshot.yaml
volumesnapshotclass.snapshot.storage.k8s.io/csi-rbdplugin-snapclass created

or

kubectl create -f snapshot.yaml

note $ is removed in second option

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I removed the $ when there is no output.
Thanks for the review

@rollandf rollandf force-pushed the csi-v1.0 branch 2 times, most recently from efac7d7 to f5abb2d Compare February 6, 2019 09:11
Copy link
Collaborator

@Madhu-1 Madhu-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


Verify that the snapshot class was created:

```bash
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


To verify if your volume snapshot has successfully been created, run the following:

```bash
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@rootfs
Copy link
Member

rootfs commented Feb 6, 2019

thank you @rollandf , some nit but looks great overall!

@rootfs rootfs self-assigned this Feb 6, 2019
@rootfs rootfs self-requested a review February 6, 2019 13:41
@rootfs
Copy link
Member

rootfs commented Feb 6, 2019

@leseb mergify got a failure, can you take a look? thanks

@rootfs
Copy link
Member

rootfs commented Feb 6, 2019

cc @leseb for mergify failure

@rootfs rootfs merged commit a56eacd into ceph:csi-v1.0 Feb 6, 2019
wilmardo pushed a commit to wilmardo/ceph-csi that referenced this pull request Jul 29, 2019
Add snapshot examples in CSI-v1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants