Commit Graph
236 Commits
Author SHA1 Message Date
Travis Nielsen 2d793cdc3f ceph: disable ceph mgr test temporarily
Due to an issue in ceph master, the mgr integration test is failing.
Until this is fixed, we will temporarily disable the test. A fix
is expected with https://github.com/ceph/ceph/pull/35915

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-07-06 09:19:41 -06:00
Sébastien Han e4eaa91ede ceph: add rgw endpoint healthcheck
We have introduced a new goroutine to check the state of the rgw
endpoint. It will run every minute and perform operations on a bucket.
The success or failure will be reported as part of the status field of
the CephObjectStore CR.

A good status will look like:

status:
  endpointStatus:
    lastChanged: "2020-06-25T13:47:45Z"
    lastChecked: "2020-06-25T13:48:46Z"
  phase: Connected

A failed status:

status:
  endpointStatus:
    details: |-
      error creating bucket "rook-ceph-internal-s3-bucket-checker": RequestError: send request failed
      caused by: Put http://rook-ceph-rgw-my-store.rook-ceph:8080/rook-ceph-internal-s3-bucket-checker: dial tcp 10.108.189.148:8080: connect: connection refused
    health: ERROR

This check works for both converged and external modes. Note that the
CephObjectStore CRD has a new field called "externalRgwEndpoints" which
allows you to define a list of IP addresses pointing to rgws.

Closes: https://github.com/rook/rook/issues/5692
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-02 16:34:10 +02:00
Madhu Rajanna 02c9bfe00f ceph: update RBAC required for external-snapshotter
Updated the required RBAC for external-snapshotter
beta to work.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-07-01 07:20:04 +05:30
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
Sébastien Han d950f4f823 ci: add more debug
If we cannot get the bucket we need more debug information.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-06-16 10:19:01 +02:00
Ali Maredia fc579f4520 ceph: initial commit for ceph rgw multisite resources
This commit contains CR implementations for:
CephObjectRealm
CephObjectZoneGroup
CephObjectZone

Also there are changes made to the objectstore
to add rgws in the object-store to zones and
zone groups in a multisite configuration and
the removal of the --default parameter for any
realms/zonegroups/zones that are created.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2020-06-09 16:28:53 -04:00
Satoru Takeuchi 43296ef36a ceph: make OSD on PVC test work again
OSD on PVC test doesn't work at all because "manual" storage class doesn't
exist here.

It's a regression caused by the following commit.
https://github.com/rook/rook/commit/e96009c26dab8d06e6d3e45efe55b9783028b359

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-05-28 06:18:59 +09:00
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 e1a9a9039b ceph: pool resize test hangs during cleanup
In Octopus 15.2.2 there is an rbd change that causes the rbd ls command
to hang if there are not sufficient OSDs to meet the replica requirement.
The smoke suite just started hanging today since the 15.2.2 image was
released with this change. Therefore, the test that resizes the pool
to replica 3 must resize back to 1 before cleaning up.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-05-19 22:02:37 -06:00
Satoru Takeuchi e96009c26d ceph: prepare PVCs for OSD on PVC test inside the integration test
The PVCs for OSD on PVC test is prepared before running the integration test.
In addition, users are forced to run this script for this by themselves.
To avoid this problem, running this script inside the integration test.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-05-14 05:14:27 +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 22c5743656 cleanup: remove the descriptions of directory-based OSD
Directory-based OSD is not supported in v1.3.0 anymore. Let's remove
the descriptions of this feature. As an exception, it should still
be in the manifests of v1.2.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-05-06 00:44:31 +09: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
Sébastien Han 7c994441c3 ceph: make admin key optional for external cluster
Currently, we need to configure the Ceph external Admin keyi
in the Rook deployment to be able to connect to an external Ceph cluster.
If we wanted to run in a multi-tenant fashion
were several K8s/Rook clusters wanted to connect to the same external ceph cluster,
each K8s deployment would have the access to the External Ceph Admin key
and could potentially access or delete the Data
from pools that belong to other k8s/Rook Clusters.

Now the admin key is optional but the helper script create-external-cluster-resources.sh
will help create the necessary keys/users to connect to that cluster.

Closes: https://github.com/rook/rook/issues/4917 and https://github.com/rook/rook/pull/5227
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-04-20 09:59:04 +02: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
Sébastien Han d16cebea70 ci: modify upgrade to master
We now install 1.2 by default, then we upgrade from 1.2 to 1.3 and 1.3
to master.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-04-15 09:12:57 +02:00
Sébastien Han c1b8a7aa9e ceph: extract rbd-mirror to its own crd
Previously, the rbd-mirror daemon was integrated into the `CephCluster`
CRD. This wasn't really practical since we would have to wait for the
whole orchestration to be done to actually set it up. The same goes for
any CR update. Let's say you want to change the number of daemons, Rook
would go through mons, mgrs and osds until it get to rbd-mirror.
This triggers an undesired full orchestration.

With its own CRD this component just gains a lot more flexibility.

Closes: https://github.com/rook/rook/issues/5084
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-04-15 09:12:56 +02:00
Travis Nielsen c4e712bbd2 tests: convert cli params to env vars
The command line flags parsing inside an init() method was causing
issues at runtime when trying to add certain new features, which
is a limitation of the flag parsing. We now move away from using
any command line flags in the tests and only use environment variables
to simplify adding new parameters to the tests.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-04-14 07:29:18 -06:00
Sébastien Han e17b6e11d5 ci: use exec combined output to check fs status
On Octopus, the "ceph fs status" reports on stderr for some reason.
So we need to combined the output to read the filesystem status.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-04-06 16:07:01 +02:00
Travis Nielsen a737975077 ceph: integration test for upgrade from nautilus to octopus
The upgrade test will now support upgrading from nautilus
to octopus and that files and be read and written
after the upgrade.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-04-06 16:07:01 +02:00
Travis Nielsen d3a8a397f9 tests: skip upgrade test where csi is not supported
The upgrade test requires the CSI driver to be running so we cannot
run the test on older versions than k8s 1.13.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit f90664209b)
2020-04-03 15:57:19 -06:00
Sébastien Han 6062771687 Merge pull request #4901 from travisn/octopus-tests
Run integration tests against octopus
2020-03-31 10:59:11 +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
Travis Nielsen 360e5552b6 ceph: run integration tests against octopus
With the release of Octopus we need to run the integration tests
on Octopus in order to have validation as a supported platform.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-30 13:32:47 -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
Umanga Chapagain ac9244fc1a Ceph: integration test creates ObjectStoreUser before ObjectStore
This fix is added to ensure that everything works as expected
when user tries to create ObjectStoreUser before creating
ObjectStore itself. ObjectStoreUser will wait for ObjectStore
to be up and running.

Signed-off-by: Umanga Chapagain <chapagainumanga@gmail.com>
2020-03-27 18:16:28 +05:30
Satoru Takeuchi a5ea2858c9 manifests: remove unnecessary namespace fields
There are many namespace fields in ClusterRole{,Binding}. However,
ClusterRole{,Binding} are not namespaced. So we can remove these.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-03-18 15:58:31 +00:00
Travis Nielsen ce1fedf884 ci: only list the images in the needed pool during cleanup
The pool cleanup only needs to happen for an individual pool.
No need to query the block images in all pools. One of the rgw
pools is periodically causing a hang when it is queried,
but there is no need to query for it when we are cleaning
up the pool tests.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-17 15:28:17 -06:00
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
Sébastien Han 44a4c1826d ci: remove object store when done
Purge the object store properly, otherwise the cephobjectstore CRD won't
be deleted since a finalizer is in place for the CR.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-03-17 15:12:41 -06:00
Sébastien Han f268c897e9 ceph: Convert the Ceph ObjectStore controller to the controller-runtime
The CRD watcher has been replaced by the new controller-runtime
framework.
This brings robustness in our operator, meaning that any resources that
are modified will be reconciled into the desired state.

Closes: https://github.com/rook/rook/issues/4937
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
Travis Nielsen 65f3f84ab0 tests: ensure pools are purged during integration tests
With a finalizer on the pools, the pools were not always being purged
during the integration tests. Now the multicluster suite will ensure
its pool is purged.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-03 19:44:23 -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
Sébastien Han 8c58cdbc78 ci: fix upgrade ordering
We now test the upgrade from M to N before the upgrade to master.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-02-13 09:17:34 +01:00
Travis Nielsen 9855db09bd ceph: describe file-test pod upon failure to terminate
The file-test consumer pod intermittently fails to stop during the
integration tests. When this happens, print the pod description
to see if there are events indicating the issue.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-02-04 12:17:27 -07:00
Travis Nielsen 8659cdbb3d ceph: refactor upgrade integration test checks for daemon versions
The upgrade test had duplicated code for checking that daemons
were upgraded after the Rook upgrade vs the Ceph upgrade.
This is now refactored for consistent checks after upgrade.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-02-04 12:17:27 -07:00
Travis Nielsen babd65d131 ceph: simplify most integration tests to single mds
The integration tests were always running two MDS daemons active,
with two standby. This is now parameterized so the test can request
how many MDS daemons to run. The smoke suite will run two active
and the rest will just run a single active MDS.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-02-04 12:17:27 -07:00
Travis Nielsen 97c4cf1631 ceph: reenable the upgrade integration test
The integration test was disabled due to removing support of pre-ceph-volume
OSDs as well as OSDs on directories. Now we re-enable the tests, with the
following approach:
- The base install in Rook v1.1 with the latest mimic release that
had c-v support
- The upgrade goes from v1.1 to Rook v1.2 then Rook master
- The final upgrade step is from mimic to nautilus

For efficiency the skipUpgradeChecks flag is added.
Logs are also collected between each upgrade step to improve
troubleshooting.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-02-04 12:17:24 -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
Travis Nielsen 55b4cdabd8 Merge pull request #4742 from leseb/external-cluster-test
ci: add external cluster functional test
2020-01-29 16:16:25 -07:00
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 153f28344e ceph: skip the upgrade checks in tests
The integration tests only have a single node so the upgrade
checks do not provide any real safety for the cluster during
the upgrade. We will be able to improve the reliability and speed
of the tests by disabling these checks.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-01-27 15:23:57 -07:00
Sébastien Han 9e4c8092fc ci: re-enable multi-cluster test
We are about to add support for external cluster in the CI so let's
re-enable this scenario.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-27 22:56:01 +01:00
Sébastien Han 0e41b45e43 ci: disable multi-cluster test
Since filestore is not supported anymore, this scenario might not be
needed anymore.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-24 12:18:21 +01:00
Sébastien Han 2245deb1a1 ci: temporarily disable upgrade suite
With the recent change, the upgrade suite needs to be adapted to only
test a c-v transition.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-24 12:18:21 +01:00
Sébastien Han 2367b65d4a ci: print more debug
Add more info on error to ease debugging.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-24 12:18:21 +01:00