Commit Graph

1459 Commits

Author SHA1 Message Date
Madhu Rajanna
c9601189ef 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>
(cherry picked from commit d816df4f42)
2020-09-10 15:05:38 +00:00
Madhu Rajanna
90da7961c5 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>
(cherry picked from commit b4693dcffe)
2020-09-10 08:54:20 +00:00
Mudit Agarwal
6105a4f428 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>
(cherry picked from commit 4de1abad5e)
2020-08-25 17:20:08 +00:00
Mudit Agarwal
1792cff878 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>
(cherry picked from commit 8c2bdbc001)
2020-08-25 08:13:52 +00:00
Madhu Rajanna
8e267b3806 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>
(cherry picked from commit 38892c3068)
2020-08-24 09:24:09 +00:00
Madhu Rajanna
45c8d178b2 rbd: fix return error message
incase of flattening error return the
flatten error.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit a7b65087af)
2020-08-24 09:24:09 +00:00
Madhu Rajanna
8ab04d4160 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>
(cherry picked from commit d5c19954c1)
2020-08-24 09:24:09 +00:00
Madhu Rajanna
d18dd87de3 rebase: update go-ceph to v0.5.0
as go-ceph is 0.5.0 is released updating
the dependency to latest release.
more info about release at
https://github.com/ceph/go-ceph/releases/tag/v0.5.0

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 2808d526bb)
2020-08-21 06:53:57 +00:00
Madhu Rajanna
8d1f3f09ba ci: change snapshotter default version to v2.1.1
we cannot depend on the master branch of external-snapshotter
in cephcsi as the master branch can change anytime. its
good to use released tags to our E2E.

fixes: #1416

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit d77b23e3c1)
2020-08-20 06:47:49 +00:00
Madhu Rajanna
a8e6bdee8e cephfs: use string const for cli error comparison
we should not return the CLI errors in GRPC errors
we need to return proper readable error messages
to the user for better understanding and better
debugging.

updates #1242

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 0bd45a5eb1)
2020-08-19 18:15:10 +00:00
Madhu Rajanna
b2a9ecf5e5 util: replace klog with util logger in liveness.go
replace klog with util logger in liveness.go

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 27d2cc644d)
2020-08-19 15:35:13 +00:00
Madhu Rajanna
2fe86bbc4b journal: replace klog with util logger in voljournal.go
journal: replace klog with util logger in voljournal.go

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit ed289fea5e)
2020-08-19 15:35:13 +00:00
Madhu Rajanna
c75f89628c journal: replace klog with util logger in omap.go
replace klog with util logger in omap.go

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 1a9cd23f64)
2020-08-19 15:35:13 +00:00
Madhu Rajanna
86aca6c631 rbd: replace klog with util logger in snapshot.go
rbd: replace klog with util logger in snapshot.go

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 7c9fee17af)
2020-08-19 15:35:13 +00:00
Madhu Rajanna
c61fd94596 rbd: replace klog with util logger in rbd_util.go
rbd: replace klog with util logger in rbd_util.go

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 9305e27797)
2020-08-19 15:35:13 +00:00
Madhu Rajanna
9938c654e1 rbd: replace klog with util logger in rbd_journal.go
replace klog with util logger in rbd_journal.go

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 90cc5a4fd0)
2020-08-19 15:35:13 +00:00
Madhu Rajanna
f9bb13a373 rbd: replace klog with util logger in rbd_attach.go
replace klog with util logger in rbd_attach.go

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 9512aa6206)
2020-08-19 15:35:13 +00:00
Madhu Rajanna
727666dedc rbd: replace klog with util logger in nodeserver.go
replace klog with util logger in nodeserver.go

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit e768c0dfc0)
2020-08-19 15:35:13 +00:00
Madhu Rajanna
4b5952d15a rbd: replace klog with util logger in driver.go
replace klog with util logger in driver.go

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 883485b082)
2020-08-19 15:35:13 +00:00
Madhu Rajanna
ab53834757 rbd: replace klog with util logger in clone.go
replace klog with util logger in clone.go

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit c4f30c23c1)
2020-08-19 15:35:13 +00:00
Madhu Rajanna
98088ec50a rbd: replace klog with util in controllerserver.go
replace klog with util in controllerserver.go

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit d8ca56fbe9)
2020-08-19 15:35:13 +00:00
Humble Chirammal
d04dbd0811 rbd: Bail out from nodeexpansion if its block mode pvc
At CSI spec < 1.2.0, there was no volumecapability in the
expand request. However its available from v1.2+ which allows
us to declare the node operations based on the volume mode.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
(cherry picked from commit 1f5b84745f)
2020-08-19 13:43:52 +00:00
Madhu Rajanna
165b8d13d1 cephfs: fix lock release in volumeDelete
currently the lock is not released which is
taken on the request name. this is causing issues
when the subvolume is requested for delete.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 787ba69089)
2020-08-18 10:07:25 +00:00
Madhu Rajanna
f9faf4822f cephfs: check error output contains Error: ENOENT
execCommandErr returns both error and stderror
message. checking strings.HasPrefix is not helpful
as the stderr will be the first string. its good
to do string comparison and find out that error
is volume not found error.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 31c7c95fdb)
2020-08-18 10:07:25 +00:00
Madhu Rajanna
91475c0a66 revert: revert back the changes for v3.1.0
as the release is done this commit reverts
back the changes to build canary images
from release branch.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-17 08:28:32 +05:30
Humble Chirammal
5d48473582 build: update templates for v3.1.0 release
updated required templates for v3.1.0 release.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2020-08-13 21:04:51 +05:30
Humble Chirammal
7111f03cf2 ci: update Makefile and deploy.sh for image tag
as we need to build and push the v3.1.0 image,
updated the Makefile and deploy.sh to build and
push image and helm tempalates

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2020-08-13 21:04:51 +05:30
Humble Chirammal
a11c370b72 ci: update branch name in the travis CI
The branch name has to be updated in the
travis yaml to run the tests and upload the
templates and release image.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2020-08-13 21:04:51 +05:30
Madhu Rajanna
f11486f4b6 doc: add note for cephfs snapshot limitation
added a note for cephfs snapshot limitations

closes #1242

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-13 11:55:23 +00:00
Madhu Rajanna
fabe84d4fe doc: add upgrade documentation for v3.1.0
added upgrade documentation to upgrade from
v3.0.0 to v3.1.0

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-13 11:03:36 +00:00
Humble Chirammal
1b94ed2b37 doc: update cephfs snapshot, restore and clone support matrix
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2020-08-13 10:12:14 +00:00
Madhu Rajanna
f566b0fc2d cephfs: replace Warningf with WarningLog in unmountVolume
replace Errorf with ErrorLog in unmountVolume
for context based logging.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-13 09:44:12 +00:00
Madhu Rajanna
3fe3d25dda cephfs: replace Errorf with ErrorLogMsg in loadAvailableMounters
replace Errorf with ErrorLog in loadAvailableMounters
for context based logging.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-13 09:44:12 +00:00
Madhu Rajanna
fbe090065d cephfs: replace Errorf with ErrorLog in purgeVolume
replace Errorf with ErrorLog in purgeVolume
for context based logging

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-13 09:44:12 +00:00
Madhu Rajanna
5a1652e5e8 cephfs: replace Errorf with ErrorLog in resizeVolume
replace Errorf with ErrorLog in resizeVolume
for context based logging.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-13 09:44:12 +00:00
Madhu Rajanna
a882c1194b cephfs: replace Errorf with ErrorLog in createVolume
replace Errorf with ErrorLog in createVolume
for context based logging.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-13 09:44:12 +00:00
Madhu Rajanna
f3d9b8933b cephfs: replace Errorf with ErrorLog in getSubVolumeInfo
replace Errorf with ErrorLog in getSubVolumeInfo
for context based logging.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-13 09:44:12 +00:00
Madhu Rajanna
2b7aade289 cephfs: replace Errorf with ErrorLog in getVolumeRootPathCeph
replace Errorf with ErrorLog in getVolumeRootPathCeph
for context based logging.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-13 09:44:12 +00:00
Madhu Rajanna
d1ac832266 cephfs: replace Errorf with ErrorLog in genSnapFromOptions
replace Errorf with ErrorLog in genSnapFromOptions
for context based logging.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-13 09:44:12 +00:00
Madhu Rajanna
e83a51c1e1 cephfs: replace Errorf with ErrorLog in parseTime
replace Errorf with ErrorLog in parseTime
for context based logging.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-13 09:44:12 +00:00
Madhu Rajanna
e7a043271d cephfs: replace Errorf with ErrorLog in cloneSnapshot
replace Errorf with ErrorLog in cloneSnapshot
for context based logging.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-13 09:44:12 +00:00
Madhu Rajanna
841a3713f5 cephfs: replace Errorf with ErrorLog in unprotectSnapshot
replace Errorf with ErrorLog in unprotectSnapshot
for context based logging.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-13 09:44:12 +00:00
Madhu Rajanna
91811c18c5 cephfs: replace Errorf with ErrorLog in protectSnapshot
replace Errorf with ErrorLog in protectSnapshot
for context based logging.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-13 09:44:12 +00:00
Madhu Rajanna
72dfe6a265 cephfs: replace Errorf with ErrorLog in getSnapshotInfo
replace Errorf with ErrorLog in getSnapshotInfo
for context based logging.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-13 09:44:12 +00:00
Madhu Rajanna
7e8cc41aca cephfs: replace Errorf with ErrorLog in deleteSnapshot
replace Errorf with ErrorLog in deleteSnapshot
for context based logging.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-13 09:44:12 +00:00
Madhu Rajanna
7f00fa66f4 cephfs: replace Errorf with ErrorLog in createSnapshot
replace Errorf with ErrorLog in createSnapshot
for context based logging.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-13 09:44:12 +00:00
Madhu Rajanna
57454cf379 cephfs: replace Errorf with ErrorLog in nodeUnstageVolume
replace Errorf with ErrorLog in nodeUnstageVolume
for context based logging.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-13 09:44:12 +00:00
Madhu Rajanna
0a5581b7a0 cephfs: replace Errorf with ErrorLog in NodeUnPublishVolume
cephfs: replace Errorf with ErrorLog in NodeUnPublishVolume
for context based logging.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-13 09:44:12 +00:00
Madhu Rajanna
79dbc41d14 cephfs: replace Errorf with ErrorLog in NodePublishVolume
replace Errorf with ErrorLog in NodePublishVolume
for context based logging.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-13 09:44:12 +00:00
Madhu Rajanna
48a313c6cc cephfs: replace Errorf with ErrorLog in mount
replace Errorf with ErrorLog in mount for
context based logging.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-13 09:44:12 +00:00