Commit Graph
31 Commits
Author SHA1 Message Date
Tom Hellier ba44602477 helm: allow further configurability of ingress version
The ingress api version changed when it went to v1, and this has caused some upheaval
throughout the kubernetes ecosystem. This commit uses a common method of deciding which
ingress api to use, and allows the optional override of the kubernetes version
presented to helm using the helm build-in capabilities.
also add an ingress into the helm integration tests so any regressions to how ingresses
are handled in the future are caught easier.

Closes rook#9174

Signed-off-by: Tom Hellier <me@tomhellier.com>
2021-11-22 10:03:02 +00:00
Blaine Gardner 264256acfb test: remove unused minimal test versions
The `*SuiteMinimalTestVersion` vars in
`tests/integration/ceph_base_deploy_test.go` are no longer needed with
Jenkins no longer being used. Remove them.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-09-17 16:49:29 -06:00
Blaine Gardner c60bf241e1 test: make object e2e test its own test
The CephSmokeSuite is becoming quite large and long, and most of the
length is now related to the object e2e tests. Separate the full object
e2e test into CephObjectSuite, and only test the object 'lite' test in
the CephSmokeSuite.

Resolves #8714

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-09-17 15:27:27 -06:00
Travis Nielsen c23238cddb ceph: refactor integration tests for simplification
The integration tests have long been painful to maintain with
settings in various places and copied to multiple types,
inconsistent variable names, and otherwise difficult to maintain
code. Now the settings for a test suite are all in one place and
they remain in the same settings type throughout the test.
The multi-cluster suite is also refactored to use the same install
and uninstall helpers as the other suites.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-03-17 11:26:10 -06:00
Travis Nielsen df47f58c05 ceph: run integration tests on k8s 1.19 for PRs
In K8s 1.19 the integration tests are not running in PRs since no test suites
were assigned to 1.19. Similarly, the flex suite was not being run since 1.14
was removed from the test matrix in master.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-09-10 11:04:40 -06:00
tenzen-y 29087f8e41 ci: fix function comments
This commit will fix outdated function comments.

Signed-off-by: tenzen-y <toyonomajyutushi@yahoo.co.jp>
2020-08-05 08:08:53 +00:00
Vineet Badrinath ce1003aef8 ceph: adds scripts and components to support admission controllers
adds deploy.sh script to deploy validatingwebhookconfiguration and create secrets.
adds new command ceph admission-controller to start webhook servers.
adds validation for various rook custom resources

Signed-off-by: Vineet Badrinath <vbadrina@redhat.com>
2020-06-24 14:59:00 +05:30
Satoru Takeuchi 206e45facd ceph: fix the wrong condition in the cluster health check
There are the following problems in the cluster health check.

- If the cluster is healthy: Unnecessary long time before exiting from
  the health check loop. The test succeeds thanks to the succeeding
  assertion by luck.
- If the cluster is unhealthy: Exit from the health check loop immediately.
  The test fails in the succeeding assertion by luck too.

It's a regression that is introduced in the following commit.
https://github.com/rook/rook/commit/c0c0dc4ed977a6b373b1884c5b76c9588f0be077

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-05-27 05:20:24 +09:00
Travis Nielsen b95b89f838 Merge pull request #4913 from jmolmo/mgr_integration_tests
Ceph: manager integration tests
2020-05-11 09:19:29 -06:00
Satoru Takeuchi c0c0dc4ed9 tests: return bool if the functions are prefixed by "Is"
There are several functions that are prefixed by "Is" and return
just error. It's straightfoward to return bool to make the meaning
of these functions clearer.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-05-05 22:55:01 +09:00
Juan Miguel Olmo Martínez 4b492e6f39 ceph: manager integration tests
Ceph orchestrator device ls
Ceph orchestrator status
Ceph orchestrator host ls
Ceph orchestrator create OSD
Ceph orchestrator ls

[test ceph]

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
2020-05-04 11:32:56 +02:00
Travis Nielsen 8d72e788c1 ceph: lookup of the cluster cannot rely on namespace name
The name of a CephCluster is commonly the same as the namespace,
but not always. When looking up the ceph cluster we can look for
the first one in the namespace rather than requiring the name
to be the same as the namespace.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-04-22 13:42:40 -06:00
Juan Miguel Olmo Martínez 28afede309 ceph: refactor <StartTestCluster>
Refactor the StartTestCluster method to make it more readable.

I have put most of the parameters used in this function in the struct.
In this way the call to this function is more easy to understand and to use.
The addition of new parameters to this method started to be annoying.

[test ceph]

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
2020-04-16 12:03:45 +02:00
Travis Nielsen ba3e601a50 ceph: update k8s versions for ceph tests on 1.18
With 1.18 in the test matrix we need to update which versions
will run the different ceph test suites.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-30 16:51:02 -06:00
Santosh Pillai 2bfd7c42bc ceph: cleanup cluster.Spec.DataDirHostPath on cluster deletion
In order to ensure proper clean up of all the rook-ceph data when the cluster is deleted, we need to clean up the dataDirHostPath (var/lib/rook)

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2020-03-30 19:36:01 +05:30
Sébastien Han a8159c62c1 ci: enable DEBUG logging
Activate DEBUG logging for the integration tests.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-03-17 15:12:41 -06:00
Travis Nielsen 4ce9b45ffd ceph: remove dead test code for cluster purging
Cluster purging is no longer called, therefore can be removed.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-05 15:39:39 -07:00
Satoru Takeuchi b1dd05a59a ceph: simplify verbose function names and a wrong var name
Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-02-29 06:35:01 +09:00
Travis Nielsen a1db52c5a0 ceph: move integration test to csi driver
The integration tests have been mostly running on the flex driver
with only a newer test on the csi driver. With the CSI driver being
the preferred driver going forward, now the integration tests will
all be running with the CSI driver with the exception of a test
suite that is only dedicated to the flex driver.

A number of other test improvements are also made for code
readability, test stability, and removing unused options.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-02-17 16:24:28 -07:00
Ashish Ranjan 94d9de27d9 ceph: Adds integration tests for OSDs over PVC
This commit enables testing OSDs over PVCs by modifying the
multi-cluster test to use PVC for provisioning OSDs when `manual`
storageClass is present in the cluster.

Signed-off-by: Ashish Ranjan <aranjan@redhat.com>
2020-02-04 19:09:49 +05:30
Sébastien Han 84fc10cdc1 ci: add external cluster functional test
Add coverage in the CI for the external cluster feature.

Closes: https://github.com/rook/rook/issues/3691
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-29 20:27:15 +01:00
Travis Nielsen 2d892b0e88 tests: allow integration tests in minimal config to run on multiple versions
When the tests run in a PR, they can only run against a single version
of K8s by default. If more than five k8s versions are supported in hte
CI, we will need to run some of the suites on multiple versions.
The versions are comma-separated in the list.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-01-13 16:54:49 -07:00
Travis Nielsen a02c2c3089 tests: run integration tests on k8s 1.17 and remove 1.12
With the release of K8s 1.17 Rook needs to test on this new version.
The integration tests will now run the tests across K8s 1.13-1.17.
The pattern has been to run the tests across the most recent five
versions.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-01-08 07:18:53 -08:00
Sébastien HanandRohan CJ 90cd8224f4 ceph: add ceph-crash controller
A new controller to bootstrap ceph-crash pod on Ceph nodes running Ceph
pods only.

This implementation is unfortunately a mix of 'hacks' to make the daemon
working correclty. The ceph-crash script faced different issues:

* it's not a daemon
* it does not have any key in cephx
* it runs ceph commands under the hood which need an admin key and a
ceph.conf

On upstream Ceph, ceph-crash needs to grow better, once that happens we
will improve our implementation.

This also enhances osd provisionConfig struct with DataPathMap

Pod volumes and volume mount needs DataPathMap to perform the right
actions on log and crash dir. Exposing DataPathMap makes that possible.

Obviously, this is exposing ceph crash reports on the host as
well as pushing them into the mgr.
Basically, if a daemon fails, it'll put its core dump into
/var/lib/ceph/crash, bindmounting this dir on the host, ensures that the
crashes don't get lost when the pod dies.

Example:

```
[leseb@tarox~/go/src/github.com/rook/rook][rgw-liveprobe !] kubectl -n rook-ceph exec -ti rook-ceph-crashcollector-minikube-574858b99c-zvg4z bash
bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory
bash: warning: setlocale: LC_COLLATE: cannot change locale (en_US.UTF-8): No such file or directory
bash: warning: setlocale: LC_MESSAGES: cannot change locale (en_US.UTF-8): No such file or directory
bash: warning: setlocale: LC_NUMERIC: cannot change locale (en_US.UTF-8): No such file or directory
bash: warning: setlocale: LC_TIME: cannot change locale (en_US.UTF-8): No such file or directory
[root@rook-ceph-crashcollector-minikube-574858b99c-zvg4z /]# ceph crash ls

[root@rook-ceph-osd-2-7644f99695-cljzh /]# pidof ceph-osd
13258 5415 5397
[root@rook-ceph-osd-2-7644f99695-cljzh /]# kill -SIGABRT 13258
[root@rook-ceph-osd-2-7644f99695-cljzh /]# ls /var/lib/ceph/crash/
2019-11-12_12:56:51.404109Z_39f060e1-776d-4605-8f28-85c97e53de96     posted

... wait maximum 10 min (ceph-crash scraps every 10 minutes)
... the container will exit

[root@rook-ceph-osd-2-7644f99695-cljzh /]# exit
[leseb@tarox~/go/src/github.com/rook/rook][rgw-liveprobe !]
[leseb@tarox~/go/src/github.com/rook/rook][rgw-liveprobe !] kubectl -n rook-ceph exec -ti rook-ceph-crashcollector-minikube-574858b99c-zvg4z bash
bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory
bash: warning: setlocale: LC_COLLATE: cannot change locale (en_US.UTF-8): No such file or directory
bash: warning: setlocale: LC_MESSAGES: cannot change locale (en_US.UTF-8): No such file or directory
bash: warning: setlocale: LC_NUMERIC: cannot change locale (en_US.UTF-8): No such file or directory
bash: warning: setlocale: LC_TIME: cannot change locale (en_US.UTF-8): No such file or directory
[root@rook-ceph-crashcollector-minikube-574858b99c-zvg4z /]#
[root@rook-ceph-crashcollector-minikube-574858b99c-zvg4z /]#
[root@rook-ceph-crashcollector-minikube-574858b99c-zvg4z /]# ceph crash ls
2019-11-12_12:56:51.404109Z_39f060e1-776d-4605-8f28-85c97e53de96 osd.1
[root@rook-ceph-crashcollector-minikube-574858b99c-zvg4z /]# ls /var/lib/ceph/crash/
posted
[root@rook-ceph-crashcollector-minikube-574858b99c-zvg4z /]# ls /var/lib/ceph/crash/posted/
2019-11-12_12:56:51.404109Z_39f060e1-776d-4605-8f28-85c97e53de96
[root@rook-ceph-crashcollector-minikube-574858b99c-zvg4z /]# tail /var/lib/ceph/crash/posted/2019-11-12_12\:56\:51.404109Z_39f060e1-776d-4605-8f28-85c97e53de96/log
   1/ 5 mgr
   1/ 5 mgrc
   1/ 5 dpdk
   1/ 5 eventtrace
  -2/-2 (syslog threshold)
  -1/-1 (stderr threshold)
  max_recent     10000
  max_new         1000
  log_file /var/lib/ceph/crash/2019-11-12_12:56:51.404109Z_39f060e1-776d-4605-8f28-85c97e53de96/log
--- end dump of recent events ---
```

Signed-off-by: Sébastien Han <seb@redhat.com>
Co-authored-by: Rohan CJ <rohantmp@gmail.com>
2019-11-12 16:06:07 +01:00
travisn 4ef3ffb8e4 test: add k8s 1.16 to the integration test matrix
With the desire to run the integration tests on the five
most recent versions of K8s, 1.16 is added and 1.11
is removed from the integration test matrix.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-19 12:46:01 -06:00
travisn a178cccd77 tests: consolidate block integration tests
The BlockCreateSuite and BlockMountUnmountSuite suites are almost identical
for running block tests with different types of mounts. We can
consolidate these into a single test suite and eliminate a couple of
the tests that are already covered by other tests.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-15 17:13:25 -06:00
travisn bd672de7db ceph: allow running minimal test matrix for ceph tests
There are six test suites and six k8s versions where we currently run
the tests. For efficiency we can restrict the testing to one suite
per k8s version. Bigger or riskier changes should still run the full
set of suites on all versions. To trigger the smaller test matrix, add
[test ceph min] to the PR description

Signed-off-by: travisn <tnielsen@redhat.com>
2019-09-18 23:06:49 -06:00
Sébastien Han 7f359ba41b operator: ceph disable flexdriver
Since Ceph CSI is stable and deployed by default, we don't need to
deploy the rook-ceph-agent daemonset.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-18 00:28:25 +02:00
travisn 86968c5064 ceph: boolean settings not applied if set to false and default
THe boolean helm settings were only being applied if their value was true.
If the desired value was false, the value would be skipped in the chart
instead of adding it with the value of false.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-09-09 23:27:35 +03:00
travisn 1598a048a1 tests: collect all logs for pods in the test namespaces
Now we collect logs for all pods and all their init and main
containers during the integration tests. No longer will we be
missing logs from the integration tests as long as the pods
are available when they are collected at the end of the test.
The pod descriptions are also written to a log file instead
of being included inline with the test output.

Signed-off-by: travisn <tnielsen@redhat.com>
(cherry picked from commit 6e0bc338f90b3f36a89cf37b542ff4ff873b70bd)
2019-08-02 11:10:46 -06:00
travisn 74a3eb6180 Rename the ceph integration test entry points
With the storage providers growing, we should make it
clear in the source which tests belong to which storage
provider. This change renames the ceph integration tests.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-07-17 23:29:52 -06:00