Commit Graph

134 Commits

Author SHA1 Message Date
Humble Devassy Chirammal
c7ba26d23d
Merge pull request #405 from humblec/driver-version
Driver version updated to 1.1.0
2019-07-12 13:55:56 +05:30
Humble Chirammal
f476c1086f Release version 1.1.0 update to driver versions and other artifacts.
*) Driver version updated for RBD and CephFS.
*) Dockerfile updated to have 1.1.0 tag
*) Deployment yamls updated to 1.1.0 yamls.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2019-07-12 13:53:27 +05:30
Poornima G
0d566ee30c Backward compatibility for deleting and mounting old volumes
Signed-off-by: Poornima G <pgurusid@redhat.com>
2019-07-12 05:42:41 +00:00
Poornima G
32ea550e3a Modify CephFs provisioner to use the ceph mgr commands
Currently CephFs provisioner mounts the ceph filesystem
and creates a subdirectory as a part of provisioning the
volume. Ceph now supports commands to provision fs subvolumes,
hance modify the provisioner to use ceph mgr commands to
(de)provision fs subvolumes.

Signed-off-by: Poornima G <pgurusid@redhat.com>
2019-07-12 05:42:41 +00:00
Madhu Rajanna
09f126691c Add nil check for process
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-07-08 12:11:53 +00:00
ShyamsundarR
c4a3675cec Move locks to more granular locking than CPU count based
As detailed in issue #279, current lock scheme has hash
buckets that are count of CPUs. This causes a lot of contention
when parallel requests are made to the CSI plugin. To reduce
lock contention, this commit introduces granular locks per
identifier.

The commit also changes the timeout for gRPC requests to Create
and Delete volumes, as the current timeout is 10s (kubernetes
documentation says 15s but code defaults are 10s). A virtual
setup takes about 12-15s to complete a request at times, that leads
to unwanted retries of the same request, hence the increased
timeout to enable operation completion with minimal retries.

Tests to create PVCs before and after these changes look like so,

Before:
Default master code + sidecar provisioner --timeout option set
to 30 seconds

20 PVCs
Creation: 3 runs, 396/391/400 seconds
Deletion: 3 runs, 218/271/118 seconds
  - Once was stalled for more than 8 minutes and cancelled the run

After:
Current commit + sidecar provisioner --timeout option set to 30 sec
20 PVCs
Creation: 3 runs, 42/59/65 seconds
Deletion: 3 runs, 32/32/31 seconds

Fixes: #279
Signed-off-by: ShyamsundarR <srangana@redhat.com>
2019-07-01 14:10:14 +00:00
ShyamsundarR
c5762b6b5c Modify RBD plugin to use a single ID and move the id and key into the secret
RBD plugin needs only a single ID to manage images and operations against a
pool, mentioned in the storage class. The current scheme of 2 IDs is hence not
needed and removed in this commit.

Further, unlike CephFS plugin, the RBD plugin splits the user id and the key
into the storage class and the secret respectively. Also the parameter name
for the key in the secret is noted in the storageclass making it a variant and
hampers usability/comprehension. This is also fixed by moving the id and the key
to the secret and not retaining the same in the storage class, like CephFS.

Fixes #270

Testing done:
- Basic PVC creation and mounting

Signed-off-by: ShyamsundarR <srangana@redhat.com>
2019-06-24 13:46:14 +00:00
Madhu Rajanna
69662e63ed change permission of targetpath
setting the permission of  targetpath to 777
will allow non-root user to write to pv.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-06-12 14:24:37 +00:00
Madhu Rajanna
a38986fce0 Enable all static-checks in golangci-lint
* Enable all static-checks in golangci-lint
* Update golangci-lint version
* Fix issue found in golangci-lint

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-06-10 15:56:17 +05:30
Madhu Rajanna
74c1a75828 Fix error string as per golang standard
Error string should not be capatalized
https://github.com/golang/go/wiki/CodeReviewComments#error-strings

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-06-10 11:10:35 +05:30
Humble Devassy Chirammal
883ccd1bb1
Merge pull request #409 from humblec/mount-options
Add mount options support in CephFS CSI driver
2019-06-07 16:28:38 +05:30
Humble Chirammal
4be3943713 Add mount options support in CephFS CSI driver
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2019-06-07 11:52:01 +05:30
Humble Devassy Chirammal
e16f246f83
Merge pull request #408 from humblec/validate-paths
Add staging target path validation to nodeserver
2019-06-07 11:37:37 +05:30
Humble Chirammal
3e2d2787b6 Add staging target path validation to nodeserver
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2019-06-06 20:38:53 +05:30
ShyamsundarR
b9cd0e18ad Make CephFS plugin stateless reusing RADOS based journal scheme
This is a part of the stateless set of commits for CephCSI.

This commit removes the dependency on config maps to store cephFS provisioned
volumes, and instead relies on RADOS based objects and keys, and required
CSI VolumeID encoding to detect the provisioned volumes.

Changes:
- Provide backward compatibility to provisioned volumes by older plugin versions (1.0.0 or older)
- Remove Create/Delete support for statically provisioned volumes (fixes #382)
- Added namespace support to RADOS OMaps and used the same to store RADOS CSI objects and keys in the CephFS metadata pool
- Added support to mention fsname for CephFS provisioning (fixes #359)
- Changed field name in CSI Identifier to 'location', to denote a pool or fscid
- Updated mounter cache to use new scheme
- Required Helm manifests are updated
- Required documentation and other manifests are updated
- Made driver option 'metadatastorage' as optional, as fresh installs do not need to specify the same

Testing done:
- Create/Mount/Delete PVC
- Create/Delete 5 PVCs
- Mount version 1.0.0 PVC
- Delete version 1.0.0 PV
- Mount Statically defined PV/PVC/Pod
- Mount Statically defined version 1.0.0 PV/PVC/Pod
- Delete Statically defined version 1.0.0 PV/PVC/Pod
- Node restart when mounted to test mountcache
- Use InstanceID other than 'default'
- RBD basic round of tests, as namespace is added to OMaps
- csitest against ceph-fs plugin
  - NOTE: CephFS plugin still does not detect and address already created
  volumes but of a different size
- Test not providing any value to the metadata storage parameter

Signed-off-by: ShyamsundarR <srangana@redhat.com>
2019-05-30 06:20:35 -04:00
ShyamsundarR
d02e50aa9b Removed config maps and replaced with rados omaps
Existing config maps are now replaced with rados omaps that help
store information regarding the requested volume names and the rbd
image names backing the same.

Further to detect cluster, pool and which image a volume ID refers
to, changes to volume ID encoding has been done as per provided
design specification in the stateless ceph-csi proposal.

Additional changes and updates,
- Updated documentation
- Updated manifests
- Updated Helm chart
- Addressed a few csi-test failures

Signed-off-by: ShyamsundarR <srangana@redhat.com>
2019-05-19 12:29:33 +00:00
Madhu Rajanna
f60a07ae82 update vendor to latest kubernetes 1.14.0
some of the kubernetes independent
packages are moved out of the tree to
new projects.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-05-14 06:56:56 +00:00
wilmardo
891daa9375 Replaces the references to the Kubernete Authors with the Ceph-CSI authors 2019-04-03 11:14:08 +02:00
Róbert Vašek
d0d5da83c9
Merge pull request #282 from huaizong/improve-remount-pv-path-when-exit-v2
remount old mount point when csi plugin unexpect exit
2019-04-02 08:36:07 +02:00
王怀宗
1f1d5f47c3 code style 2019-04-01 23:02:19 +08:00
王怀宗
6de862d6cb code style 2019-04-01 21:20:53 +08:00
王怀宗
f3e5f83ee0 mount info cache dir support multi cephfsdriver 2019-03-29 16:13:48 +08:00
王怀宗
4ec3a5777a code style 2019-03-29 16:09:05 +08:00
王怀宗
2097741607 remove cephRootPrefix as global var 2019-03-29 06:26:48 +00:00
王怀宗
295202b98e issue #285
fix unexpect getCephRootPathLocal value

PluginFolder update at main.go, so cephRootPrefix may get unexpected value
2019-03-29 06:26:48 +00:00
王怀宗
043d3603ff remove unuse var 2019-03-29 10:51:11 +08:00
王怀宗
5b53e90ee4 fix code style 2019-03-29 10:18:59 +08:00
王怀宗
af330fe68e 1. fix mountcache race conflict
2. support user-defined cache dir
    3. if not define mountcachedir disable mountcache
2019-03-27 16:04:58 +08:00
王怀宗
b318964af5 issue #91
issue #217

Goal

we try to solve when csi exit unexpect, the pod use cephfs pv can not auto recovery because lost mount relation until pod be killed and reschedule to other node. i think this is may be a problem. may be csi plugin can do more thing to remount the old path so when pod may be auto recovery when pod exit and restart, the old mount path can use.

NoGoal

Pod should exit and restart when csi plugin pod exit and mount point lost. if pod not exit will get error of **transport endpoint is not connected**.

implment logic

csi-plugin start:

	1. load all MountCachEntry  from node local dir
	2. check if volID exist in cluster, if no we ignore this entry, if yes continue
	3. check if stagingPath exist, if yes we mount the path
	4. check if all targetPath exist, if yes we binmount to staging path

NodeServer:

1. NodeStageVolume: add MountCachEntry on local dir include readonly attr and ceph secret
2. NodeStagePublishVolume: add pod bind mount path to MountCachEntry  and persist local dir
3. NodeStageunPublishVolume: remove pod bind mount path From MountCachEntry  and persist local dir
4. NodeStageunStageVolume: remove MountCachEntry  from local dir
2019-03-25 22:47:39 +08:00
Madhu Rajanna
d61a87b42e Fix driver name as per CSI spec
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-03-13 12:04:30 +05:30
Madhu Rajanna
8f07c9efcc remove unused param from function
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-03-04 19:01:25 +05:30
Huamin Chen
d938944528
Merge pull request #233 from gman0/fuse-unmount-wait
cephfs: wait for FUSE to exit after unmount
2019-02-27 15:00:28 -05:00
gman
b779009770 parse ceph-fuse PID with regexp 2019-02-27 20:29:20 +01:00
Madhu Rajanna
fdc0d8255a move csi-common to ceph-csi
kubernetes/driver/csi-common is no
longer maintained.

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-02-27 14:17:19 +05:30
gman
3a0d048186 cephfs/volumemounter: unmountVolume now waits till the ceph-fuse daemon exits 2019-02-26 17:57:24 +01:00
gman
2f8931315a don't attempt to delete mountpoint if unmount failed 2019-02-26 14:46:21 +01:00
gman
143003bcfd cephfs: added locks for {Create,Delete}Volume, NodeStageVolume 2019-02-26 11:06:25 +01:00
gman
60588d8968 cephfs/volume: create/delete-volume idempotency checks 2019-02-26 11:06:16 +01:00
gman
ce3affcc6a cephfs: DeleteVolume should assume the volume to be already deleted if metadata doesn't exist 2019-02-25 18:07:28 +01:00
Madhu Rajanna
68e69502e8 remove secret and key from logging
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-02-21 17:05:24 +05:30
Madhu Rajanna
6fbde110cd skip redundant error check
correct misspelled  word

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-02-18 17:16:59 +05:30
gman
8223ae325b addressed review comments 2019-02-14 13:55:51 +00:00
gman
96bf4a98bd cephfs: don't need to store keyrings anymore 2019-02-14 13:55:51 +00:00
gman
8e371f62fa cephfs: ceph-fuse mimic supports passing keys via args, let's use it 2019-02-14 13:55:51 +00:00
gman
b3944f3121 cephfs exec: read stdout and stderr separately 2019-02-14 13:55:51 +00:00
gman
a63b06a620 cephfs: specify monitors explicitly 2019-02-13 14:09:33 +00:00
gman
9cd0786569 cephfs/volume: fixed incorrect path for unmountAndRemove 2019-02-12 17:39:54 +01:00
Madhu Rajanna
bf7ec10fea Remove glog from Gopkg.toml
replace klog with glog

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-02-08 13:51:22 +05:30
Humble Chirammal
c9da8469ad migrate cephfs code to use klog instead of glog
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2019-02-05 12:09:04 +00:00
Madhu Rajanna
5983fedddb Fix issues found in gometalinter static check
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-02-04 10:44:37 +05:30