Commit Graph

1752 Commits

Author SHA1 Message Date
Madhu Rajanna
ba17282906 revert: template changes for release v3.2.2
This reverts commit d719986cac
which was created to make template changes for
v3.2.2 release.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-05-03 19:07:14 +05:30
Madhu Rajanna
d719986cac build: template changes for release v3.2.2
Updated the required files to make cephcsi
v3.2.2 for bug fix release which includes
ceph CVE fix https://docs.ceph.com/en/latest/security/CVE-2021-20288/

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-05-03 16:36:11 +05:30
Madhu Rajanna
47707b79d9 build: remove helm init from deploy.sh
from helm v3.x version there is no helm init
command. Removing the helm init which was causing
helm chart pushing issue in release and devel
branch.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 6508726276)
2021-05-03 09:45:14 +00:00
Madhu Rajanna
58641250f8 build: install helm version from build.env
Install the helm package based on the version
specified in the build.env

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit aa77b677a3)
2021-05-03 09:45:14 +00:00
Niels de Vos
2131b49bdf ci: use "devel" branch instead of "master"
Signed-off-by: Niels de Vos <ndevos@redhat.com>
(cherry picked from commit a7e95e756a)
2021-05-03 14:56:53 +05:30
Niels de Vos
79b47751ba deploy: use "devel" branch instead of "master"
Signed-off-by: Niels de Vos <ndevos@redhat.com>
(cherry picked from commit 116eeb0817)
2021-05-03 14:56:53 +05:30
Niels de Vos
b8cb56d0d5 doc: rename "master" branch to "devel"
Signed-off-by: Niels de Vos <ndevos@redhat.com>
(cherry picked from commit 9f3d1b49b8)
2021-05-03 14:56:53 +05:30
Madhu Rajanna
08599a537b e2e: add e2e for cephfs VolumeNamePrefix for PVC
when user provides an option for VolumeNamePrefix
create subvolume with the prefix which will be easy
for user to identify the subvolumes belongs to
the storageclass, Added an E2E testing to verify
that the subvolume contains the Prefix what is
provided in the storageclass.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit f4d5fdf114)
2021-02-19 18:23:40 +00:00
Madhu Rajanna
8873a87187 cephfs: create subvolume with VolumeNamePrefix
when user provides an option for VolumeNamePrefix
create subvolume with the prefix which will be easy
for user to identify the subvolumes belongs to
the storageclass.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 8720f4e2f5)
2021-02-19 18:23:40 +00:00
Niels de Vos
0d635b5b99 rbd: include rados-namespace when calling addRbdManagerTask()
It seems that calls to addRbdManagerTask() do not include the
rados-namespace in the image location. Functions calling
addRbdManagerTask() construct the image location themselves, but should
use rbdVolume.String() to include all the attributes.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
(cherry picked from commit d534ee9ce8)
2021-02-12 13:30:41 +00:00
Niels de Vos
2d5cc39e59 rbd: log error when scheduling flattening fails
Signed-off-by: Niels de Vos <ndevos@redhat.com>
(cherry picked from commit 8d0b39e690)
2021-02-12 13:30:41 +00:00
Niels de Vos
4d4ead26dd e2e: use secret with "encryptionPassphrase" for RBD tests
The e2e tests create a Secret for using with the RBD StorageClass.
However this Secret was not used, instead the Rook generated Secret was
linked in the StorageClass.

By using our own Secret from the examples, Rook should not touch it when
we make modifications. In addition, no modifications are needed for
encryption anymore, as these are included in the example.

Updates: #1795
Signed-off-by: Niels de Vos <ndevos@redhat.com>
(cherry picked from commit 5bcd5cb928)
2021-02-12 13:30:41 +00:00
Niels de Vos
4005585806 util: store EnvVaultInsecure as string, not bool
The configuration option `EnvVaultInsecure` is expected to be a string,
not a boolean. By converting the bool back to a string (after
verification), it is now possible to skip the certificate validation
check by setting `vaultCAVerify: false` in the Vault configuration.

Fixes: #1852
Reported-by: Bryon Nevis <bryon.nevis@intel.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
(cherry picked from commit 582d004ca5)
2021-02-02 12:43:48 +00:00
Mudit Agarwal
08904884d3 cephfs: ignore BytesQuota field in case it is not set.
This can happen when the subvolume is in snapshot-retained state.
We should not return error for such case as it is a valid situation.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
(cherry picked from commit d480eb4bda)
2021-02-01 10:35:39 +00:00
Ilya Dryomov
64f3361ff4 rbd: enable mapping and unmapping from a network namespace
Make rbdplugin pod work in a non-initial network namespace (i.e. with
"hostNetwork: false") by skipping waiting for udev events when mapping
and unmapping images.  CSI use case is very simple: all that is needed
is a device node which is immediately fed to mkfs, so we should be able
to tolerate udev not being finished with the device just fine.

Fixes: #1323
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 04644c1d58)
2021-01-13 17:28:25 +00:00
Ilya Dryomov
ca59d53a60 rbd: introduce appendDeviceTypeAndOptions()
Factor out --device-type and --options formatting.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit c2493686b7)
2021-01-13 17:28:25 +00:00
Ilya Dryomov
6918cbe950 rbd: rename ndbType parameter
Fix "ndb" typo.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit d3f31187fc)
2021-01-13 17:28:25 +00:00
Ilya Dryomov
2a090b785c rbd: rename mapOptions and options argument slices
With the new support for passing --options, referring to ExecCommand()
argument slices as mapOptions and options is confusing.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 5631b83dd0)
2021-01-13 17:28:25 +00:00
Mudit Agarwal
680d8b8408 rebase: update golang version to v1.15.5
To fix math/big CVE, this version of golang has the fix
for this vulnerability.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
(cherry picked from commit 0339df2b02)
2021-01-11 14:34:39 +00:00
Niels de Vos
568c80e688 build: use v3.2-canary after v3.2.1 release
v3.2.1 has been released, so revert back to the v3.2-canary version for
HEAD of the release-v3.2 branch.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2021-01-07 09:59:19 +01:00
Niels de Vos
bf0cc10322 build: update version to v3.2.1
After releasing, the version will be changed back to v3.2-canary again.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2021-01-06 15:48:19 +01:00
Seena Fallah
96245a372b e2e: add filesystem PVC resize test for radosNamespace
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit 1f17d25407)
2021-01-06 10:40:16 +00:00
Seena Fallah
cb3ba5f58f rbd: fix namespace json parser for xbdDeviceInfo
rbd device list --format=json returns namespace as a namespace not radosNamespace

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
(cherry picked from commit fdec9f65b8)
2021-01-06 10:40:16 +00:00
Yug
33fece7cd5 deploy: Fix snapshot controller deployment
Replace image from canary to the version mentioned
in build.env

Signed-off-by: Yug <yuggupta27@gmail.com>
(cherry picked from commit 3109160fa0)
2021-01-06 08:05:05 +00:00
Madhu Rajanna
0a6af26ea3 revert: revert back the changes done for v3.2.0 release
updated the image version and the build templates
to point to v3.2-canary.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-12-09 21:16:21 +05:30
Madhu Rajanna
997f9283f3 build: update CSI_IMAGE_VERSION in deploy.sh
update deploy.sh to use correct CSI_IMAGE_VERSION
from the build.env.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 68adacad36)
2020-12-09 12:39:51 +00:00
Madhu Rajanna
74930819dc build: add CSI_IMAGE_VERSION to build.env
CSI_IMAGE_VERSION is needed by the centos CI
to build and push the image to the minikube vm.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-12-09 16:26:12 +05:30
Madhu Rajanna
60488d1837 deploy: update templates for v3.2.0 release
updating required templates and scripts for v3.2.0
release.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-12-09 16:26:12 +05:30
Madhu Rajanna
518ccf42b3 deploy: add option to set default-fstype in provisioner
external-provisioner is exposing a new argument
to set the default fstype while starting the provisioner
sidecar, if the fstype is not specified in the storageclass
the default fstype will be applied for the pvc created from
the storageclass.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-12-08 16:09:25 +00:00
Madhu Rajanna
7d3bff0654 e2e: enable topology based provisioning
as we are testing the topology based
provisioning in our E2E, we need to set
topology=true in E2E.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-12-08 16:09:25 +00:00
Madhu Rajanna
e3d1ba7703 deploy: set topology=false in provisioner sidecar
with csi-provisioner v2.x the topology based
provisioning will not have any backward compatibility
with older version of kubernetes, if the nodes are
not labeled with topology keys, the pvc creation
is going to get fail with error `accessibility
requirements: no available topology found`, disabling
the topology based provisioning by default, if user want
to use it he can always enable it.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-12-08 16:09:25 +00:00
Madhu Rajanna
1c469fa522 doc: update new release matrix
updating the readme with latest release
image and version.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-12-08 10:43:06 +00:00
Madhu Rajanna
72fa77a6d7 ci: add mergify rules for release-v3.2
added mergify rules for backporting and
for auto merging the PR.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-12-08 11:25:16 +01:00
Mudit Agarwal
a92d8d7f2e deploy: update csi sidecar images
This PR makes the changes in csi templates and
upgrade documentation required for updating
csi sidecar images.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2020-12-08 10:23:34 +00:00
Mudit Agarwal
ba8ead6e04 doc: add upgrade document for 3.2
Added upgrade document for 3.2 with a separate section on
CSI sidecar containers update.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2020-12-07 15:16:46 +00:00
Madhu Rajanna
43fde0a30a cleanup: add a helper function storeImageID
added a helper function storeImageID to reduce
code duplication.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-12-07 11:03:27 +00:00
Madhu Rajanna
b2fb43b335 cleanup: reduce the code complexity of controller
created a new helper function to getCredentials.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-12-07 11:03:27 +00:00
Madhu Rajanna
e243c0006b rbd: dont generate OMAP data for static volume
if the user has created a static PV for a RBD
image which is not created by CSI driver, dont
generate the OMAP data.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-12-07 11:03:27 +00:00
Madhu Rajanna
c40872df00 rbd: undo reservation incase of errors
If cephcsi encounters any error after
reservation, as a cleanup operation
it should revert back the reservation.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-12-07 11:03:27 +00:00
Madhu Rajanna
99dbe27921 rbd: return nil if the omap data exists
If the omap data already exits return nil.
so that omap generator will not try to reserve
anything again.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-12-07 11:03:27 +00:00
Madhu Rajanna
5cddfc454e ci: update mergify rules for github actions
as we have added new github actions for the
static checks in #1762. This commits adds
the mergify rules for those github actions.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-12-07 10:48:53 +01:00
Madhu Rajanna
edf6abce99 ci: add github workflows for static checks
adding a github workflow to run static checks
inside a container.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-12-07 12:57:29 +05:30
Niels de Vos
11e1eda98b build: install diffutils in test container image
Depending on the local changes, running 'make containerized-test' fails
with an error like:

    level=error msg="Running error: gofmt: error computing diff: exec: \"diff\": executable file not found in $PATH"

Installing the diffutils package makes sure 'go fmt' finds the
executable.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-12-04 05:01:17 +00:00
Madhu Rajanna
ebb413534f cephfs: remove unsed cr util.Credentials
remove unused cr util.Credentials variable.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-12-03 14:53:33 +00:00
Madhu Rajanna
0f451ed465 cephfs: implement getSnapshotInfo with go-ceph
implement getSnapshotInfo function with go-ceph
to get subvolume information.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-12-03 14:53:33 +00:00
Niels de Vos
b0f3b27209 ci: set imagePullPolicy for Vault to IfNotPresent
Deploying Vault still fails on occasion. It seems that the
imagePullPolicy has not been configured for the container yet.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-12-03 13:17:24 +00:00
Madhu Rajanna
ddf91de859 cephfs: implement clonesnapshot with go-ceph
updated ceph fs CLI implementaion of cloning
with go-ceph.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-12-03 06:39:18 +00:00
Madhu Rajanna
814bf4459a cephfs: implement snapshot protect and unprotect to go-ceph
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-12-03 06:39:18 +00:00
yati1998
78968f76e8 doc: update snap-clone with rbd snapshot
RBD Snapshot doc was the part of the README.md file. Hence,
renamed the cephfs-snap-clone.md file to snap-clone.md file
and moved the rbd snapshot document there.

Signed-off-by: yati1998 <ypadia@redhat.com>
2020-12-02 21:48:39 +00:00
Madhu Rajanna
00d34fdb2d ci: run github work flow only for pull request
currently github action are getting trigerred for
both pull and push request, this commits removes the
action for push  events.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-12-02 20:09:56 +05:30