Commit Graph

1626 Commits

Author SHA1 Message Date
Marton Natko
91c49c14b3 rbd: fix problem with deletion of a namespaced image
fix problem with deletion of a namespaced image

Signed-off-by: Marton Natko <mnatko@transip.nl>
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-09-25 15:35:22 +00:00
Marton Natko
2fbca0d1e2 rbd: fix typo in createVolume validation
Signed-off-by: Marton Natko <mnatko@transip.nl>
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-09-25 15:35:22 +00:00
Mudit Agarwal
e1237f348f rbd: replace cli with go-ceph for snapshot namespace
cephcsi uses cli for fetching snap list as well as to check the
snapshot namespace, replaced that with go-ceph calls.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2020-09-25 08:07:32 +00:00
Niels de Vos
06066cd153 ci: do not assume Docker is availble on the minikube host
Instead of using the Docker command to push the image to to minikube VM,
read the image from stdin over ssh and load it with the Docker command
that is available inside the VM.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-09-24 14:35:24 +00:00
Madhu Rajanna
89b326c896 cephfs: check ENOTEMPTY when removing subvolume
return a proper error message to the user when
the subvolume has the snapshots and it cannot
be removed until the snapshots on the subvolume
have to be deleted.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-09-23 13:51:23 +00:00
Niels de Vos
f41cd105c4 e2e: add simple ceph-fuse StorageClass tests
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-09-23 12:12:51 +00:00
Niels de Vos
85df59531b e2e: pass SC parameters to createCephfsStorageClass()
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-09-23 12:12:51 +00:00
Niels de Vos
6f2f972f5b cephfs: trim spaces around fuseMountOptions
When passing

    fuseMountOptions: debug

in the StorageClass, the mount options passed on the ceph-fuse
commandline result in "-o nonempty ,debug". The additional space before
the ",debug" causes the mount command to fail.

Fixes: 1485
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-09-23 12:12:51 +00:00
Jakub Kuzelka
9ab197bc63 fix:remove global values and fix closing values on issues
Signed-off-by: Jakub Kuzelka <jakub@kuzelka.pw>
2020-09-22 14:12:25 +00:00
Madhu Rajanna
43f28af495 doc: replace nautilus with master in ceph doc link
refer to master branch of ceph docs instead of nautilus.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-09-21 13:27:28 +00:00
Madhu Rajanna
d1f175d9f3 rbd: add support for rbd map and unmap options
added support for providing map and unmap
options to rbd CLI when mapping rbd image
on the node.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-09-21 13:27:28 +00:00
Mudit Agarwal
8e434bb3ee build: update vendor with latest version
Updating the version of golang.org/x/text to version v0.3.3.
It fixes the vulnerability in http://golang.org/x/text/encoding/unicode
which leads UTF-16 decoder entering an infinite loop causing
the program to crash or run out of memory.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2020-09-21 10:49:28 +00:00
Madhu Rajanna
eaa911d21d doc: update readme for RBD ROX support
updated readme for RBD ROX support.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-09-17 08:50:15 +00:00
Madhu Rajanna
d31427d91a doc: add v3.1.0 release details to doc
added v3.1.0 release details to readme doc.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-09-17 08:50:15 +00:00
Yug
0682f0e500 cephfs: Fetch subvolume features in newSnapshotOptionsFromID
Get subvolume features using subvolume info and update the
volume options with Features parameter.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-09-16 16:05:28 +00:00
Yug
9e959c45a3 cephfs: No-Op Unprotect call if "snapshot-autoprotect" feature present
The subvolume features consists the list of features, which if includes
"snapshot-autoprotect", result in query based approach to
detecting the need for protect/unprotect.
If "snapshot-autoprotect" feature is present, The UnprotectSnapshot
call should be treated as a no-op

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-09-16 16:05:28 +00:00
Yug
43a4c100ec cephfs: No-Op Protect call if "snapshot-autoprotect" feature present
The subvolume features consists the list of features, which if includes
"snapshot-autoprotect", result in query based approach to
detecting the need for protect/unprotect.
If "snapshot-autoprotect" feature is present, The ProtectSnapshot
call should be treated as a no-op

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-09-16 16:05:28 +00:00
Niels de Vos
409b12e4ee ci: drop Kubernetes patch version from conditions
With the improvements from #1480 there is no need to specify the full
Kubernetes versions anymore, the major version is sufficient now.

See-also: #1480
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-09-15 17:17:32 +05:30
Madhu Rajanna
4b435d9a12 ci: update mergify rules for e2e tests
as we have added v1.19.0 in CI for E2E tests and also
removed the v1.17.x from CI updating the mergify rules
for the same.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-09-15 16:43:20 +05:30
Yug
365eb58ff7 cephfs: use subvolume info if available
Use subvolume info to fetch the subvolume path.
If `subvolume info` command is not available,
use `getpath` command instead.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-09-10 15:03:45 +00:00
Yug
59fc4aa00f cephfs: validate if subvolume has snapshot-retention feature
Add validateSnapshotRetention() to verify if subvolume has
`snapshot-retention` feature.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-09-10 15:03:45 +00:00
Yug
6351358752 cephfs: Add --retain-snapshots flag to purge volume operations
Snapshots can be retained even after subvolume deletion in
Ceph 14.2.12. Adding support for the same in ceph-csi.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-09-10 15:03:45 +00:00
Madhu Rajanna
be3a78afaf e2e: update cephfs ROX test case
updated cephfs ROX test case to create
ROX Clone PVC instead of creating an empty PVC

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-09-10 13:47:23 +00:00
Madhu Rajanna
860b65c446 cephfs: allow readonly only for volume with contentsource
It doesnot make sense to allow the creation of empty
volumes with readonly access, this commit allows the
creation of volume which is having readonly capabilities
only if the content source is set for the volume.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-09-10 13:47:23 +00:00
Madhu Rajanna
2deabcd284 rbd: allow readonly only for volume with contentsource
It doesnot make sense to allow the creation of empty
volumes which is going to be accessed with readonly mode,
this commit allows the creation of volume which is having
readonly capabilities only if the content source is set
for the volume.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-09-10 13:47:23 +00:00
Madhu Rajanna
d816df4f42 util: add helper to validate ROX request
added a helper function to validate is create
request for ROX is for volume from source.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-09-10 13:47:23 +00:00
Madhu Rajanna
b4693dcffe e2e: rework on E2E framework
rework of E2E framework for better code
organization and add more helpful logs for
debugging.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-09-10 07:40:13 +00:00
Madhu Rajanna
3ea22bc5a8 ci: update kubernetes version to v1.19.0
updated kubernetes version to latest release
in travis configuration for upgrade testing

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-09-08 09:59:46 +00:00
Madhu Rajanna
e0bdea24a1 ci: update minikube to latest released version
as we need minikube 1.13 for kubernetes v1.19.0
updating minikube to the latest released version

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-09-08 09:59:46 +00:00
Humble Chirammal
edca318828 rebase: update the CSI Spec to v1.3.0
This spec add the extra capability to  node and controller
volume to report volume condition of a pv..etc.

Refer # https://github.com/ceph/ceph-csi/issues/1356

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2020-09-04 09:24:01 +00:00
Prasanna Kumar Kalever
bddf395eba ci: allow CONTAINER_CMD prefixed with sudo
Allow passing:
$ CONTAINER_CMD="sudo docker" ./scripts/minikube.sh cephcsi
or
$ CONTAINER_CMD="sudo podman" ./scripts/minikube.sh cephcsi

Because the container images could list in '# sudo docker images' or
'# sudo podman images' incase if the Makefile target image-cephcsi is
run with sudo

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2020-09-04 07:17:37 +00:00
Prasanna Kumar Kalever
6fa7b74138 ci: add a way to supply CONTAINER_CMD of choice
Add a way to supply local CONTAINER_CMD option of choice via
env variable to minikube.sh

Note: we still use docker daemon env at minikube box, in the future
we can switch to podman service env '# minikube podman-env' if needed

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2020-09-04 07:17:37 +00:00
Madhu Rajanna
f2edc926cf deploy: remove preStop hook from daemonset templates
The lifecycle preStop hook fails on container stop / exit
because /bin/sh is not present in the driver registrar container
image.

the driver-registrar will remove the socket file
before stopping. we dont need to have any preStop hook
to remove the socket as it was not working as expected

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-31 17:24:54 +00:00
Prasanna Kumar Kalever
b8bd233b15 doc: correct default kube version
fix kube version in e2e/README.md

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2020-08-28 03:59:58 +00:00
Prasanna Kumar Kalever
a44035888e ci: update minikube only when latest is asked
Fixes: #1431
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2020-08-26 09:17:15 +00:00
Prasanna Kumar Kalever
4ff60483ca rebase: update kubectl to latest version
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2020-08-26 07:54:54 +00:00
Prasanna Kumar Kalever
ff29f0903c rebase: bump up to latest MINIKUBE_VERSION
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2020-08-26 07:54:54 +00:00
Mudit Agarwal
4de1abad5e rbd: NodeExpandVolume() should use StagingTargetPath
Form kubernetes v1.19 onwards NodeRequest is getting volume path
in StagingTargetPath instead of VolumePath, cephcsi should also
use the same.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2020-08-25 15:58:44 +00:00
Niels de Vos
200d8089f5 doc: add description of most useful GitHub labels
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-25 11:18:25 +00:00
Santiago Sanchez Paz
6ece9bed92 util: Fix tracevol to use --config for oc only
tracevol.py uses --config instead of --kubeconfig when invoked with
-c kubectl and -k <some_path> at the same time.

Signed-off-by: Santiago Sanchez Paz <sanchezpaz@gmail.com>
2020-08-25 10:04:19 +00:00
Mudit Agarwal
8c2bdbc001 rbd: implement rbd.updateVolWithImageInfo() with go-ceph
updateVolWithImageInfo() is currently executing an rbd command
to get details about an RBD image. Replaced it with the
required go-ceph functions.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2020-08-25 07:06:40 +00:00
Madhu Rajanna
d928782ebf deploy: add missing " for nodes watch verb
add missing " for nodes watch verb in
clusterrole binding

fixes #1433

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-25 06:09:35 +00:00
Madhu Rajanna
38892c3068 rbd: rearrange the cleanup order incase clone fails
in case of clone failure, we need to first delete
the clone and the snapshot from which we created
the clone, then as part of cleanup we need to remove
the temporary cloned image and the temporary snapshot
created on the parent image.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-24 08:16:59 +00:00
Madhu Rajanna
a7b65087af rbd: fix return error message
incase of flattening error return the
flatten error.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-24 08:16:59 +00:00
Madhu Rajanna
d5c19954c1 e2e: add backend image validation for rbd
validate backend rbd images count in each
E2E test cases. This helps a lot to catch
the issues in each test case.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-24 08:16:59 +00:00
Yug
843ea1ce31 doc: Correct cli arguments matrix
Correct the matrix for deploy-rbd document.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-08-24 07:12:42 +00:00
Yug
2d050e3ff0 doc: correct the cli arguments matrix
The current matrix seems to be showing
the undesired values which is corrected
with this commit.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-08-24 07:12:42 +00:00
Yug
c73fa55b97 doc: Add step to verify if PVC is in Bound State
Verify if PVC is in Bound state before it's
snapshot is created.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-08-24 07:12:42 +00:00
Yug
d9c8b07b84 doc: Correct title of capabilities doc
Correct capabilities doc with minor nits.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-08-24 07:12:42 +00:00
Yug
e3fb20de21 doc: Correct minor nits
Correct development-guide doc with minor
nit picks.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-08-24 07:12:42 +00:00