Madhu Rajanna
fd4c019aba
cleanup: remove duplicate code
...
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-02-19 13:44:10 +05:30
Madhu Rajanna
e91a59d2f9
RBD: Remove dead code
...
during volume creation we are validating
that volume name cannot be empty,removing
this check as we are not going to hit
this case
Fixes : #204
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-02-19 12:17:40 +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
49f5d4a54e
fix lint error
2019-02-14 21:31:52 +00:00
gman
1803a1be97
rbd: don't delete volume/snapshot if metadata creation fails
2019-02-14 21:31:52 +00:00
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
892d65d387
added StripSecretInArgs in pkg/util
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
gman
6099f142f0
moved klog initialization into pkg/util package
2019-02-12 16:31:55 +01:00
Huamin Chen
a195856104
Merge pull request #186 from Madhu-1/remove-glog
...
Remove glog from Gopkg.toml
2019-02-08 07:23:13 -05:00
Huamin Chen
9c4e5543c9
Merge pull request #185 from Madhu-1/log-req
...
Avoid logging secrets in request
2019-02-08 07:21:19 -05: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
Madhu Rajanna
a5f2635bc0
avoid logging secrets in request
...
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-02-08 13:20:21 +05:30
Madhu Rajanna
f670c62526
Remove userID and key logging from rbd
...
Fixes : #171
2019-02-08 12:40:48 +05:30
Humble Chirammal
c0712db08a
migrate util package to klog from glog.
...
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2019-02-05 12:09:04 +00:00
Humble Chirammal
cb77ff5d87
Migrate rbd package to klog from glog
...
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2019-02-05 12:09:04 +00:00
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
Madhu Rajanna
74796bd57b
Fix review comment
...
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-29 18:29:07 +05:30
Madhu Rajanna
03d93219d7
Fix metalinter issue
...
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-29 11:37:03 +05:30
Madhu Rajanna
50ba8ed446
Fix gometalinter issues
...
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-29 11:24:36 +05:30
Madhu Rajanna
ca2e475296
Fix gometalinter issues
...
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-29 11:23:50 +05:30
Madhu Rajanna
7a0c233c27
Fix issues found in gometalinter
...
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-29 11:20:35 +05:30
Madhu Rajanna
008c82c1e7
Fix gometalinter issues
...
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-29 11:20:35 +05:30
Madhu Rajanna
25642fe404
Add method comments
...
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-29 11:20:35 +05:30
Madhu Rajanna
b71a9bfe40
Fix issue with error handling in metadata store
...
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-28 10:26:57 +05:30
Huamin Chen
aa4fce2c8b
Merge pull request #133 from Madhu-1/fix-golint
...
Fix golint
2019-01-27 10:04:42 -05:00
Madhu Rajanna
48ca11336e
Fix snapshot time during snapshot create
...
Fixes : #146
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-25 19:09:35 +05:30
Madhu Rajanna
7fcbdfb945
Fix template to add userID
...
Fix Node server
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-25 14:20:32 +05:30
Madhu Rajanna
1a246f7bf3
simplify the error check
...
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-25 14:16:03 +05:30
Madhu Rajanna
36f99e36ca
Fix unparam issues
...
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-25 14:16:03 +05:30
Madhu Rajanna
284c5801c3
Fix golint issue
...
pkg/rbd/rbd.go:67:65⚠️ exported func NewNodeServer
returns unexported type *rbd.nodeServer, which can be
annoying to use (golint)
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-25 14:16:03 +05:30
Madhu Rajanna
4c564207c6
Fix error checking issue in json Decode
...
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-25 14:15:25 +05:30
Madhu Rajanna
1d11d0acc3
Fix lint issues
...
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-25 14:15:25 +05:30
Madhu Rajanna
5eb1974e38
Fix vetshadow issues
...
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-25 14:15:25 +05:30
Madhu Rajanna
75beccd8c0
Remove unused variable
...
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-25 14:14:48 +05:30
Madhu Rajanna
49c8fe5d50
Remove conversion which is not required
...
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-25 14:14:48 +05:30
Madhu Rajanna
1c03334a90
Add constant for rbd and ndb
...
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-25 14:14:48 +05:30
Madhu Rajanna
fa78c00535
update struct names and struct fiels
...
it wont be meaningful to call cephfs.NewcephfsDriver()
to get a new driver, it will be better if we call
cephfs.GetNewDriver() which returns the cephfs driver
object.
same goes for rbd also
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-25 14:14:48 +05:30
Madhu Rajanna
15b5b0112e
rename Id to ID to fix lint issue
...
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-25 14:14:48 +05:30
Madhu Rajanna
8f2941dd47
Remove code complexity
...
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-25 14:13:04 +05:30
Madhu Rajanna
de1f099680
Remove unused struct fields
...
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-25 14:10:52 +05:30
Madhu Rajanna
9f76f6bd59
Remove dead code
...
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-25 14:10:52 +05:30
Huamin Chen
c6c496ff59
switch to node registrar
2019-01-22 14:46:41 -05:00
Huamin Chen
0151792684
review feedback: make monValueFromSecret override monitors if both are set
...
Signed-off-by: Huamin Chen <hchen@redhat.com>
2019-01-21 09:21:03 -05:00
Huamin Chen
db463edeef
allow ceph mon stored in secret so when mon changes, cephfs driver can get latest mons and override old ones
...
Signed-off-by: Huamin Chen <hchen@redhat.com>
2019-01-18 10:27:48 -05:00
Huamin Chen
48407e2484
add csi volume device mount path to csi plugin
...
Signed-off-by: Huamin Chen <hchen@redhat.com>
2019-01-17 08:57:18 -05:00
Huamin Chen
263c45bb45
enable csi block; use canary external-provisioner image to pick up block volume provisioning
...
Signed-off-by: Huamin Chen <hchen@redhat.com>
2019-01-16 13:52:45 -05:00
Masaki Kimura
0e60dabca3
Move resolving bind mount logic from k8s
2019-01-16 13:00:48 -05:00
Masaki Kimura
ea75a9d162
Fix pv deletion issue caused by not dettaching due to wrong mount count
2019-01-16 12:51:13 -05:00
Masaki Kimura
5867d495fd
Change csi rbd to create/delete targetPath for publish/unpublish
2019-01-16 12:50:17 -05:00
Masaki Kimura
165b82a44c
Add block supports to rbd driver
2019-01-16 12:49:02 -05:00
Madhu Rajanna
e42e66ff30
user errors.New if error formatting is not required
...
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-16 18:54:13 +05:30
Madhu Rajanna
17f5c0a7ce
use Errorf is error formatting is required
...
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-16 18:54:06 +05:30
Madhu Rajanna
20af5afcab
Fix golint issues
...
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-16 18:33:38 +05:30
Madhu Rajanna
9ddc265c10
reject block volume creation in cephfs
...
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-16 18:17:14 +05:30
Huamin Chen
aed7506d88
fix merge leftovers; use canary driver-registrar image, as v1.0.0 is not hosted in quay.io
...
Signed-off-by: Huamin Chen <hchen@redhat.com>
2019-01-15 13:31:06 -05:00
Huamin Chen
e46099a504
reconcile merge
...
Signed-off-by: Huamin Chen <hchen@redhat.com>
2019-01-15 16:20:41 +00:00
Huamin Chen
85b8415024
Merge branch 'master' into master-to-1.0
2019-01-15 16:15:30 +00:00
mickymiek
b387daaabf
remove useless comment
2019-01-14 20:15:09 +00:00
mickymiek
32cb974b8c
gofmt
2019-01-14 20:15:09 +00:00
mickymiek
62d65ad0cb
cm metadata persist for rbd and cephfs
2019-01-14 20:15:09 +00:00
Patrick Ohly
51d6ac6f55
rbd: refuse to create block volumes
...
Without this check, the driver fails one of the E2E storage tests in
Kubernetes 1.13: provisioning a block volume is expected to fail in
e689d515f7/test/e2e/storage/testsuites/volumemode.go (L329-L330)
2019-01-14 20:15:09 +00:00
gman
29bdeb2261
cephfs: don't set quotas for zero-sized volumes
2019-01-14 20:15:09 +00:00
Patrick Ohly
403cad682c
rbd: protect against concurrent gRPC calls
...
The timeout value in external-provisioner is fairly low. It's not
uncommon that it times out and retries before the rbdplugin is done
with CreateVolume. rbdplugin has to serialize calls and ensure that
they are idempotent to deal with this.
2019-01-14 20:15:09 +00:00
Mike Cronce
2c3961b960
pkg/rbd/rbd.go: Fix "go vet" errors
2018-12-04 21:54:00 -05:00
Mike Cronce
23a4126aed
pkg/rbd/controllerserver.go: gofmt
2018-12-04 21:44:04 -05:00
Mike Cronce
d9fbdeb517
pkg/cephfs: Use request name to generate deterministic volume names
2018-12-04 21:39:00 -05:00
Mike Cronce
04872e5ebf
Merge branch 'master' of github.com:ceph/ceph-csi into csi-v1.0.0
2018-12-04 16:28:37 -05:00
Mike Cronce
22e23640a4
pkg/rbd/rbd.go: Updated PluginFolder to use new CSI 1.x directory
2018-12-04 15:38:09 -05:00
Mike Cronce
37caeb5b2c
pkg/cephfs/driver.go: Updated PluginFolder to use new CSI 1.x directory
2018-12-04 15:38:09 -05:00
gman
ed811e0506
cephfs: don't set quotas for zero-sized volumes
2018-12-01 10:39:09 +01:00
Mike Cronce
af3083f717
pkg: Updated "version" variables from 0.3.0 to 1.0.0
2018-11-29 13:15:52 -05:00
Mike Cronce
93cb8a04d7
pkg/rbd: Updated for new versions of CSI/Kubernetes dependencies
2018-11-24 14:18:24 -05:00
Mike Cronce
41b30eb6c2
pkg/cephfs: Updated for new versions of CSI/Kubernetes dependencies
2018-11-24 13:48:36 -05:00
Patrick Ohly
720ad4afeb
rbd: protect against concurrent gRPC calls
...
The timeout value in external-provisioner is fairly low. It's not
uncommon that it times out and retries before the rbdplugin is done
with CreateVolume. rbdplugin has to serialize calls and ensure that
they are idempotent to deal with this.
2018-10-26 15:29:48 +02:00
Huamin Chen
188cdd1d68
Merge pull request #89 from rootfs/containerized
...
support nsmounter when running in containerized mode
2018-10-15 20:25:40 -04:00
Huamin Chen
3436a094f7
support nsmounter when running in containerized mode
...
Signed-off-by: Huamin Chen <hchen@redhat.com>
2018-10-15 14:59:41 +00:00
Patrick Ohly
25e3a961c3
rbdplugin: idempotent DeleteVolume
...
When the initial DeleteVolume times out (as it does on slow clusters
due to the low 10 second limit), the external-provisioner calls it
again. The CSI standard requires the second call to succeed if the
volume has been deleted in the meantime. This didn't work because
DeleteVolume returned an error when failing to find the volume info
file:
rbdplugin: E1008 08:05:35.631783 1 utils.go:100] GRPC error: rbd: open err /var/lib/kubelet/plugins/csi-rbdplugin/controller/csi-rbd-622a252c-cad0-11e8-9112-deadbeef0101.json/open /var/lib/kubelet/plugins/csi-rbdplugin/controller/csi-rbd-622a252c-cad0-11e8-9112-deadbeef0101.json: no such file or directory
The fix is to treat a missing volume info file as "volume already
deleted" and return success. To detect this, the original os error
must be wrapped, otherwise the caller of loadVolInfo cannot determine
the root cause.
Note that further work may be needed to make the driver really
resilient, for example there are probably concurrency issues.
But for now this fixes : #82
2018-10-09 12:08:56 +02:00
Huamin Chen
239f295dd1
Merge pull request #79 from rootfs/rbd-nbd
...
allow monitors be embedded in credential secret
2018-09-24 08:58:09 -04:00
Huamin Chen
d5b7543565
allow monitors be embedded in credential secret
...
Signed-off-by: Huamin Chen <hchen@redhat.com>
2018-09-21 14:43:01 +00:00
Kenjiro Nakayama
c1e072de0b
Fix misspelling of "successfully"
2018-09-21 23:08:23 +09:00
Huamin Chen
30a5d9a6e7
add rbd-nbd mounter in storage class
...
Signed-off-by: Huamin Chen <hchen@redhat.com>
2018-09-18 14:09:12 +00:00
Huamin Chen
6f3625b11e
review feedback
...
Signed-off-by: Huamin Chen <hchen@redhat.com>
2018-09-18 13:10:28 +00:00
Huamin Chen
8955eb03bc
support rbd-nbd
...
Signed-off-by: Huamin Chen <hchen@redhat.com>
2018-09-17 18:12:22 +00:00
gman
3c11129149
cephfs: ceph user is created in CreateVolume and deleted in DeleteVolume
2018-08-28 10:21:11 +02:00
gman
9c3389d784
cephfs/util: log execCommandJson; cache mount.New() instance
2018-08-28 10:19:28 +02:00
gman
12958d0a9a
cephfs/cephuser: fixed getCephUser
...
output from `ceph auth -f json get` contains non-JSON data in the beginning
workaround for this is searching for the start of valid JSON data (starts with "[{")
and start reading from there
2018-08-28 10:13:53 +02:00
gman
6ddf98addf
cephfs: cache available volume mounters
2018-08-14 16:48:30 +02:00
gman
c515a013d3
cephfs: volumemounter probe
...
The driver will now probe for either ceph fuse/kernel every time
it's about to mount a cephfs volume.
This also affects CreateVolume/DeleteVolume where the mounting
was hard-coded to ceph kernel client till now - mounter configuration
and probing are now honored.
2018-08-14 11:19:41 +02:00
Huamin Chen
43b9f9aeaa
Merge pull request #61 from sngchlko/support-snapshot-in-rbdplugin
...
Support snapshot in rbdplugin
2018-08-09 09:31:31 -04:00
Seungcheol Ko
38aa575925
check snapshot feature
2018-08-09 22:07:13 +09:00
Seungcheol Ko
4312907f7b
remove the snapshot if can't store snapshot information
2018-08-09 22:07:06 +09:00
Seungcheol Ko
b0e68a52e0
Refactoring using users
2018-08-09 22:07:00 +09:00
Seungcheol Ko
7d90783f03
fix nit
2018-08-09 22:06:51 +09:00
Róbert Vašek
069140e74a
Merge pull request #65 from clkao/execCommandJson-error
...
Log error output for execCommandJson as well.
2018-08-08 17:58:52 +02:00