fc5eadf106
rbd: Add rados namespace support for rbd
...
Make sure to operate within the namespace if any given
when dealing with rbd images and snapshots and their journals.
Signed-off-by: Mehdy Khoshnoody <mehdy.khoshnoody@gmail.com >
2020-08-12 16:22:58 +05:30
b5320d9273
e2e: add backend validation for pvc restore and clone
...
added backend subvolume validation for cephfs
snapshot restore and pvc to pvc clone.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com >
2020-08-11 16:21:29 +00:00
2307687dc2
e2e: add backend validation of cephfs pvc
...
added a backend validation to check subvolumes
count when we create and delete pvc.
fixes #1316
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com >
2020-08-11 16:21:29 +00:00
141b89f514
e2e: add function to get subvolume list
...
added a helper function in e2e to list subvolumes
in a filesystem
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com >
2020-08-11 16:21:29 +00:00
07890aace6
doc: correct rbd snap-clone doc
...
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-11 13:39:47 +00:00
44191b5a1f
e2e: update cephcsi upgrade testing version
...
updated upgrade testing version to 3.0.0
to check the backward compatibility with the
latest release.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com >
2020-08-11 12:20:19 +00:00
bfde065f92
util: move getMonsAndClusterID to util
...
as we had duplicate functions in both cephfs
and rbd this commit moves the function to util.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com >
2020-08-11 10:02:53 +00:00
18f4e9d519
util: move csiconfigfile to util
...
as we have csiconfigfile in both cephfs
and rbd moving the configfile path to
util folder.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com >
2020-08-11 10:02:53 +00:00
35c5afcd3e
ci: always fetch GIT_SINCE for commitlint
...
When running the commitlint CI job, the branch that the PR is based on
may not be available. That makes it impossible for commitlint to detect
the changes between the HEAD of the branch, and the commits in the PR.
By fetching GIT_SINCE unconditionally, commitlint should be able to
detect the changes and only run the tests against the commits that were
added through the PR.
Signed-off-by: Niels de Vos <ndevos@redhat.com >
2020-08-11 08:11:37 +00:00
b864afd6d7
util: use local ErrorLog() for Create/RemoveObject() instead of klog
...
Signed-off-by: Niels de Vos <ndevos@redhat.com >
2020-08-11 08:11:37 +00:00
eaea18df0f
util: use local FatalLog() for NewK8sClient() instead of klog
...
Signed-off-by: Niels de Vos <ndevos@redhat.com >
2020-08-11 08:11:37 +00:00
9d4020d255
util: use local ErrorLog() for CheckKernelSupport() instead of klog
...
Signed-off-by: Niels de Vos <ndevos@redhat.com >
2020-08-11 08:11:37 +00:00
75ae16cfab
util: use local DefaultLog() for util/topology instead of klog
...
Signed-off-by: Niels de Vos <ndevos@redhat.com >
2020-08-11 08:11:37 +00:00
bf02227207
util: use local ErrorLog() for OperationLock.release() instead of klog
...
Signed-off-by: Niels de Vos <ndevos@redhat.com >
2020-08-11 08:11:37 +00:00
fb56a7595a
util: use local ErrorLog() for GetCryptoPassphrase() instead of klog
...
Signed-off-by: Niels de Vos <ndevos@redhat.com >
2020-08-11 08:11:37 +00:00
61924adf57
util: use FatalLog() in util/httpserver.go
...
Hide the use of klog by using our own FatalLog() function.
Signed-off-by: Niels de Vos <ndevos@redhat.com >
2020-08-11 08:11:37 +00:00
ab033f85df
util: add FatalLog(), ErrorLog() and WarningLog() functions
...
These functions will always log the message, irrespectively of the
log-level that has been configured.
Signed-off-by: Niels de Vos <ndevos@redhat.com >
2020-08-11 08:11:37 +00:00
44863a9d29
cleanup: move log functions to util/log.go
...
There is a util/log.go file, so the log functions in util/util.go can be
moved there.
Signed-off-by: Niels de Vos <ndevos@redhat.com >
2020-08-11 08:11:37 +00:00
b86d329d1e
rbd: add stagingpath to error message
...
if the stagingpath is not present inside
the container send the staging path in error
message.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com >
2020-08-10 08:51:23 +00:00
ef1785ce4d
e2e: remove volume populate test case and also change writeDataInPod()
...
As we are populating the volume in other two test cases for clone and
snapshot operation, we dont need a specific test case now.
WriteDataInPod() function is also changed to take the pod spec and write
some data to it
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
7d2bba1375
cephfs: introduce parsetime() to parse createdAt field in snap return
...
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
c3400bfb97
cephfs: add snapshot create and delete functionalilies
...
It also add helper routines like parsetime,doSnapshot..etc
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
20c90ddfc4
cephfs: getVolumeRootPathCeph and purgeVolume use new error strings
...
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
1f4839cb5e
cephfs: add subvolume struct and getSubvolumeInfo calls
...
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
31e9288f8f
cephfs: remove inValidCommmand and errNotFoundString
...
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
5bceb590fd
cephfs: add snap reserve/unreserve and snap exist functionalities
...
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
38d005e4e6
cephfs: validate create volume request
...
Also add functionality to generate snap from request
and to get mon and clusterID from the request
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
9c000add29
cephfs: Change checkVolExist for snapshot and clone workflow
...
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
c773097f85
cephfs: add snapshot and clone helper functions
...
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
d1fe12b4f0
cephfs: change createvolume for snapshot/clone workflow
...
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
c31f349c6f
cephfs: use delete operation lock in delete volume
...
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
f9257ed1cb
cephfs: add snapshot create/delete capabilities in controllerserver
...
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
5a71949dcd
cephfs: introduce newSnapshotOptionsFromID to generate volOpt and sid
...
From provided CSI volume ID this populate volumeOptions and snapshot
identifier after connecting to the snapJournal.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
a4f2c5617c
cephfs: retrieve NewCSISnapshotJournal with namespace set
...
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
1746b4e6ee
cephfs: add various error strings for command validation
...
Compared to previous version of the error strings, this change
depend on error strings like ENOENT, EEXIST, EINVAL..etc
The format of the error strings change in different cluster versions
and the error code return should not change. This also add extra
error strings for snapshot and clone operation outputs
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
6dcf03a4bc
cephfs: add checkContentSource() to validate the data source
...
checkContentSource() validate the data source in the request
and then populate volumeOptions or snapshotshot identifier in
case of snapshot source. If the data source is volume, then
parentVolumeOption and pvID are populated.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
2bb0bbde7f
cephfs: change createBackingVolume to accomodate clone operations
...
adjust createBackingVolume() to create a subvolume from snapshot
or existing subvolume by taking restore or clone operation locks
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
c968380134
cephfs: add snapshotlock and operationlock to controllerserver
...
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
66827facc3
cephfs: make use of expand operation lock in ControllerExpandVolume
...
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
074feddaf3
e2e: add test cases for cephfs snapshot creation,deletion and restore
...
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
90762342a0
e2e: introduce createCephFSSnapshotClass creation
...
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
2d72550a39
e2e: introduce writeDataInPod() to write data to an attached PVC
...
writeDataInPod() write data to the attached PVC using `dd` command
It leave the pod and pvc state as it is.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
53fa00dee8
deploy: update external provisioner version to v1.6.0 from v1.4.0
...
update helm chart and deploy yaml for version upgrade
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
c85d03c79e
e2e: add/modify deployment files for cephfs snapshot/clone tests
...
Add snapshot class, snapshot, restore, clone PVC and pod yamls
for e2e test to consume
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
b40af5d1a5
helm: add deployment charts for cephfs csi snapshotter and roles
...
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
cd107d433d
deploy: add csi-cephfsplugin provisioner deployment and role
...
Signed-off-by: Humble Chirammal <hchiramm@redhat.com >
2020-08-08 00:11:35 +00:00
23e0874ebf
deploy: add wrapper function of kubectl
...
Add retries to prevent ci failure instantly.
Now, the command execution will retry upto
5 times, to avoid failures in some runs.
Signed-off-by: Yug <yuggupta27@gmail.com >
2020-08-07 09:28:24 +00:00
d8df06e3d8
ci: update mergify rules for centos ci
...
Updated mergify rules for auto merging the PR
in master branch.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com >
2020-08-06 13:36:43 +05:30
96ecb3946d
ci: remove e2e testing from travis CI
...
Remove E2E testing from travis CI as we
are moving to run E2E tests in centos CI.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com >
2020-08-06 13:36:43 +05:30
c578ab01a7
ci: pass HELM_VERSION when installing Helm in test container
...
Signed-off-by: Niels de Vos <ndevos@redhat.com >
2020-08-05 07:43:10 +00:00