Commit Graph

151 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
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
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
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
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
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
39b1f2b4d3 cleanup: fix mispell words
fixed mispell words in the repo.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-11-29 12:47:46 +05:30
Niels de Vos
954ac97d22 ci: add more logging during Rook deployment
It seems that the new log_errors() function does not get triggered when
the script hits `exit 1` conditions in functions. The functions should
return a non-0 value, not cause an exit of the script.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-11-24 18:12:29 +00:00
Niels de Vos
ed033153ea ci: gather logs when deploying Rook fails
Log a few commands that help troubleshooting Rook deployment issues.
This might need to get extended with more commands.

Updates: #1636
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-11-24 14:53:38 +00:00
Madhu Rajanna
8d3a44d0c4 rbd: add minsnapshotsonimage flag
An rbd image can have a maximum number of
snapshots defined by maxsnapshotsonimage
On the limit is reached the cephcsi will
start flattening the older snapshots and
returns the ABORT error message, The Request
comes after this as to wait till all the
images are flattened (this will increase the
PVC creation time.  Instead of waiting till
the maximum snapshots on an RBD image, we can
have a soft limit, once the limit reached
cephcsi will start flattening the task to
break the chain. With this PVC  creation time
will only be affected when the hard limit
(minsnapshotsonimage) reached.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-11-18 05:59:20 +00:00
Niels de Vos
880b5bb427 ci: use the Fedora container registry for cephcsi:test
This reduces the dependency on Docker, where image pull rate limits are
seen in the CI.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-11-17 09:28:02 +00:00
Niels de Vos
523d813b4e doc: allow in-line HTML in MarkDown documents
The GitHub style for Pull Request and Issue templates add HTML tags for
some advanced usage. The MarkDown linter should not give warnings when
these are used.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-10-28 11:25:34 +00:00
Madhu Rajanna
fdbd487741 ci: fix shellcheck in test-go
Fixed shellcheck in test-go script

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-10-27 17:04:09 +00:00
Niels de Vos
381ea22641 ci: create ceph-csi-config ConfigMap for external storage tests
The StorageClasses that get deployed for the Kubernetes e2e external
storage tests reference a ConfigMap that contains the connection details
for the Ceph cluster. Without this ConfigMap, Ceph-CSI will not function
correctly.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-10-23 11:40:28 +00:00
Prasanna Kumar Kalever
4b7c9ea5cb e2e: add SNAPSHOT_VERSION to build.env
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2020-10-14 08:47:00 +00:00
Prasanna Kumar Kalever
94c1b2e021 e2e: update external-snapshotter version to v3.0.1
For external-snapshotter v3.0.1,
Supported CSI Spec Versions: 1.0.0, 1.1.0, 1.2.0
Minimum Kubernetes version: 1.17
Recommended Kubernetes version: 1.17

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2020-10-14 08:47:00 +00:00
Prasanna Kumar Kalever
5d49247945 e2e: defend on k8s version for snap-controller install
Currently the scripts/install-snapshot.sh script needs to be called
depending on the Kubernetes version. It would be much easier to use the
script if it is intelligent enough to decide itself whether k8s snapshot
controller needs to be installed or not.

Fixes: #1139
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2020-10-14 08:47:00 +00:00
Prasanna Kumar Kalever
268c0f1965 e2e: add snapshotter deploy functionality to minikube script
Just like deploy-rook and teardown-rook, this patch will add
install snapshotter and cleanup snapshotter option to minikube
script.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2020-10-13 14:04:54 +00:00
Humble Chirammal
e154029e6d deploy: update csi-attacher to v2.2.0 from v2.1.0
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2020-10-13 12:34:42 +00:00
Humble Chirammal
e89394a5a6 deploy: update csi-snapshotter to matching version of deployment
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2020-10-13 12:34:42 +00:00
Humble Chirammal
bae289ea0a deploy: update sidecar repo paths to new image repository
The image repository has been migrated to k8s.gcr.io/sig-storage from
quay.io/k8scsi.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2020-10-13 12:34:42 +00:00
Nico Berlee
7b940df568 helm: add pod anti-affinity for provisioner deployments
When replication count is >1 of the provisioner, the added anti-affinity rules
will prevent provisioner operators from scheduling on the same nodes. The
kubernetes scheduler will spread the pods across nodes to improve availability
during node failures.

Signed-off-by: Nico Berlee <nico.berlee@on2it.net>
2020-09-29 09:29:58 +00:00
Niels de Vos
fd4328cd53 ci: add files to run Kubernetes external storage e2e suite
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-09-28 17:03:37 +00:00
Niels de Vos
06066cd153 ci: do not assume Docker is availble on the minikube host
Instead of using the Docker command to push the image to to minikube VM,
read the image from stdin over ssh and load it with the Docker command
that is available inside the VM.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-09-24 14:35:24 +00:00
Prasanna Kumar Kalever
bddf395eba ci: allow CONTAINER_CMD prefixed with sudo
Allow passing:
$ CONTAINER_CMD="sudo docker" ./scripts/minikube.sh cephcsi
or
$ CONTAINER_CMD="sudo podman" ./scripts/minikube.sh cephcsi

Because the container images could list in '# sudo docker images' or
'# sudo podman images' incase if the Makefile target image-cephcsi is
run with sudo

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2020-09-04 07:17:37 +00:00
Prasanna Kumar Kalever
6fa7b74138 ci: add a way to supply CONTAINER_CMD of choice
Add a way to supply local CONTAINER_CMD option of choice via
env variable to minikube.sh

Note: we still use docker daemon env at minikube box, in the future
we can switch to podman service env '# minikube podman-env' if needed

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2020-09-04 07:17:37 +00:00
Prasanna Kumar Kalever
a44035888e ci: update minikube only when latest is asked
Fixes: #1431
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2020-08-26 09:17:15 +00:00
Prasanna Kumar Kalever
4ff60483ca rebase: update kubectl to latest version
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2020-08-26 07:54:54 +00:00
Prasanna Kumar Kalever
5f6fec5f0a cleanup: remove deprecated vm-driver option
$ minikube start --help
...
    --vm-driver='': DEPRECATED, use `driver` instead.
...

'vm-driver' option is deprecated at minikube v1.8.0, we should really
start using 'driver'

Related: https://github.com/kubernetes/minikube/pull/6888

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2020-08-20 17:41:05 +00:00
Prasanna Kumar Kalever
21ff9420fc ci: update minikube if latest version exists
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2020-08-20 16:58:09 +00:00
Prasanna Kumar Kalever
669b4ac063 ci: remove the minikube version check
Problem:
-------

$ minikube version
minikube version: v1.12.2
commit: be7c19d391302656d27f1f213657d925c4e1cfc2-dirty

$ ./scripts/minikube.sh up
installed minikube version v1.12.2 is not matching requested version latest

Here v1.12.2 is the latest version of minikube, but the script simply bails out.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2020-08-20 16:58:09 +00:00
Prasanna Kumar Kalever
e3e38ae758 ci: fix indentation in minikube script
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2020-08-20 16:58:09 +00:00
Prasanna Kumar Kalever
c98cc68f9d ci: reorder function declaration in minikube script
In this script we defined all the functions at the top and then started
with executable commands (entry points to script start).

Only this function is odd in the script unlike the rest of them, defined
in between the execution sequence taking away the readability.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2020-08-20 16:58:09 +00:00
Madhu Rajanna
d77b23e3c1 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>
2020-08-20 06:14:10 +00:00
Yug
fcb2bcdb12 ci: skip functional tests for pre-commit config yaml
Skip functional tests for changes in `.pre-commit-config.yaml`.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-08-20 05:28:54 +00:00
Niels de Vos
fb9ae06b1f ci: mark .commitlintrc.yml as doc-only
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-19 09:58:34 +00:00
Niels de Vos
c0fbaf4276 ci: only retry "kubectl create" if objects are missing
There can be spurious failures in the CI when running kubectl create. On
occasion, the command returns with an error, but the api-server did
receive and process the request. This causes a 2nd create action to fail
with messages like:

    cephcluster.ceph.rook.io/my-cluster created
    Error from server: error when creating "/tmp/tmp.Ur1ZPG85o9/cluster-test.yaml": etcdserver: request timed out
    Error from server (AlreadyExists): error when creating "/tmp/tmp.Ur1ZPG85o9/cluster-test.yaml": configmaps "rook-config-override" already exists
    Error from server (AlreadyExists): error when creating "/tmp/tmp.Ur1ZPG85o9/cluster-test.yaml": cephclusters.ceph.rook.io "my-cluster" already exists
    Error from server (AlreadyExists): error when creating "/tmp/tmp.Ur1ZPG85o9/cluster-test.yaml": configmaps "rook-config-override" already exists
    Error from server (AlreadyExists): error when creating "/tmp/tmp.Ur1ZPG85o9/cluster-test.yaml": cephclusters.ceph.rook.io "my-cluster" already exists
    Error from server (AlreadyExists): error when creating "/tmp/tmp.Ur1ZPG85o9/cluster-test.yaml": configmaps "rook-config-override" already exists
    Error from server (AlreadyExists): error when creating "/tmp/tmp.Ur1ZPG85o9/cluster-test.yaml": cephclusters.ceph.rook.io "my-cluster" already exists
    Error from server (AlreadyExists): error when creating "/tmp/tmp.Ur1ZPG85o9/cluster-test.yaml": configmaps "rook-config-override" already exists
    Error from server (AlreadyExists): error when creating "/tmp/tmp.Ur1ZPG85o9/cluster-test.yaml": cephclusters.ceph.rook.io "my-cluster" already exists

By handling the create action differently, and checking for the
AlreadyExists word in the stderr output, it is possible to detect
repeated creates that are not needed.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-13 16:28:28 +00:00
Yug
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
Niels de Vos
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
Niels de Vos
d4f18458de ci: include build.env variables when installing Helm
By default the install-helm.sh script uses "latest" as version for Helm.
Unfortunately this version does not exist. The HELM_VERSION variable is
already set in build.env, so source the configuration file as one of the
first actions in install-helm.sh.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-05 07:43:10 +00:00
Niels de Vos
b9d1f16360 ci: make number of CPUs for minikube VM configurable
By default minikube uses 2 CPUs, which might be too little for some of
the tests. When not passing a CPUS environment variable, use all CPUs
available on the system (detected with 'nproc').

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-04 08:46:17 +00:00
Niels de Vos
74ba85f87b ci: add "make run-e2e"
The keeps the standard arguments for e2e testing in a single location
instead of spread over multiple files and CI jobs.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-07-31 16:03:54 +00:00
Niels de Vos
ff94ba282c ci: deploy rook with mon_warn_on_pool_no_redundancy in ceph.conf
In test environments the default pool size is set to 1, so there is no
redundancy. This causes recent Ceph versions to complain with
HEALTH_WARN as POOL_NO_REDUNDANCY get set.

By disabling the mon_warn_on_pool_no_redundancy option in ceph.conf, the
warning is not reported and the cluster is marked HEALTHY.

See-also: rook/rook#5925
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-07-31 16:03:54 +00:00
Niels de Vos
fb60f66178 ci: use the host /sbin/losetup in minikube VM
minikube has /sbin/losetup from Busybox, and that does not work with
raw-block PVCs. Use the losetup executable from the host in the VM
instead.

See-also: kubernetes/minikube#8284
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-07-31 16:03:54 +00:00
Niels de Vos
230dd67752 ci: increase memory in the minikube VM
While testing with tehj default 3000 MB RAM in the minikube VM, creating
a encrypted RBD volume fails because 'cryptsetup' gets killed:

[  766.072585] Out of memory: Kill process 18497 (cryptsetup) score 1182 or sacrifice child
[  766.072589] Killed process 18497 (cryptsetup) total-vm:863136kB, anon-rss:510336kB, file-rss:10788kB, shmem-rss:0kB
[  766.072688] oom_reaper: reaped process 18497 (cryptsetup), now anon-rss:510336kB, file-rss:10780kB, shmem-rss:0kB

Using 4 GB RAM should prevent this from occuring.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-07-31 16:03:54 +00:00
Niels de Vos
f46fb13357 ci: run "kubectl cluster-info" through minikube
In case kubectl did not get installed (VM_DRIVER != none),
scripts/minikube.sh can fail when kubectl is not in the path. By running
the "kubectl cluster-info" command through minikube, the script will
succeed.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-07-31 16:03:54 +00:00
Niels de Vos
e774ebb7f9 ci: detect available minikube executable
In case there is a minikube executable in the $PATH already, use that
for all commands. If there is none, install_minikube() will place a
newly downloaded executable in /usr/local/bin which will be used by the
full pathname, so that commands as root without /usr/local/bin in the
$PATH will work.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-07-31 16:03:54 +00:00