Commit Graph
300 Commits
Author SHA1 Message Date
Travis Nielsen 47ddb504d4 Merge pull request #4509 from mateuszlos/clientCRD_tests
ceph: client CRD test fixes
2019-12-19 12:33:31 -07:00
Mateusz Los cd713b11cb ceph: client CRD test fixes
wait for client to be updated before verifying caps

Signed-off-by: Mateusz Los <los.mateusz@gmail.com>
2019-12-16 23:06:33 +01:00
Travis Nielsen 32a69b8afc ceph: clarifications to v1.2 upgrade guide
Removed some obsolete instructions from the 1.1 upgrade
and made a few minor fixes to make the upgrade to 1.2 smoother.
With the addition of the CephClient CRD, the CRD needs to be
created before the upgrade or else the operator log will be
filled with errors until it is created. The CSI driver also
had an error when registering after the upgrade due to an RBAC
change.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-12-16 11:31:52 -07:00
Blaine Gardner 9f7f7d63e9 ceph: integration: upgrade: disable dashboard
Disable the dashboard in the upgrade test because upgrading Ceph from
Mimic to Nautilu with Rook v1.0 can stall for a LONG time when updating
the mgr module. We are pretty sure there is very little risk that the
upgrade test will expose problems with the dashboard module that aren't
caught by other integration tests.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-12-11 11:27:37 -07:00
Blaine Gardner 3cc5bf5191 integration: k8s helper, raise RetryLoop by 50%
To stabilize tests, raise the `RetryLoop` variable 50%.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-12-11 11:27:36 -07:00
Blaine Gardner 20e5639461 ceph: integration:upgrade: long wait for mgr module
Reset the integration test k8s helper's `RetryLoop` to its original
value, and instead only wait an extra long time to allow the mgr module
updates to take a long time after Ceph is updated from Mimic to Nautilus
as part of Ceph's upgrade integration test.

Updating mgr modules can hang for quite a while, which causes the tests
to time out waiting for the OSDs to be updated. Allow this to take a
long time so the tests aren't as flaky.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-12-11 11:27:36 -07:00
Travis Nielsen 500198cf90 Merge pull request #4464 from travisn/client-crd-test-cleanup
Cleanup the client crd between tests
2019-12-10 08:49:18 -07:00
Travis Nielsen 3294384da7 Merge pull request #4415 from leseb/use-minor-version
rook-ceph: stop using ceph version with timestamp and bump to 14.2.5
2019-12-10 08:14:51 -07:00
Sébastien Han 68fd4f4df9 rook: stop using ceph version with timestamp
With https://github.com/ceph/ceph-container/pull/1529, we now build
vX.X.X version so we don't need to have the timestamp. Also we will
automatically get the last changes from the OS/packages too more
frequently.

Closes: https://github.com/rook/rook/issues/4414
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-12-10 11:39:35 +01:00
Travis Nielsen ecd961f280 ceph: cleanup the client crd between tests
The new CephClient CRD needed to be cleaned up between
the test suite runs.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-12-09 23:58:30 -07:00
Mateusz Los 50f3d29cf4 ceph: client controller tests and docs
ceph client CRD refactoring
Add info about client crd to documentation
Add tests for client controller CRD

Signed-off-by: Mateusz Los <los.mateusz@gmail.com>
2019-12-09 12:48:44 +01:00
Blaine Gardner b9a5717356 integration: raise retry loop count
Raise the retry loop count to stabilize the integration tests.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-11-13 12:23:18 -07:00
Blaine Gardner e5f2f45408 ceph: integration: add pre-test disk wipe job
Before starting an integration test, run a job on all nodes to wipe the
disks so that the integration tests will actually test Rook using the
disks for storage.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-11-13 12:23:18 -07:00
Blaine Gardner 79160abd18 ceph: in upgrade test, ensure legacy osds run
During upgrade tests, Rook should verify that it can still run legacy
OSDs. This includes directory-based OSDs, filestore disk OSDs, and
bluestore disk OSDs installed without ceph-volume (i.e., before mimic
v13.2.2) can still be run after upgrade.

This necessitates running the upgrade test twice; once with filestore
and once with bluestore.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-11-13 12:23:17 -07:00
Rohan CJ dd3f0ca63c Ceph: Set the drain-canaries deployment ownerReference to the rook operator.
The drain canary was not being garbage collected properly.

Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2019-11-13 16:04:45 +05:30
egafford 59adfc04b5 test: functional default baseTestDir for remote k8s master
Using the current working directory as the base test directory
fails with an unclear error message when running mkfs for OSDs
if tests are run when the k8s master node is not running on
localhost.

This change creates a new flag for the test suite to set the
base test directory, but uses a default that is safe for
virtualized test environments ("/data").

Fixes: #4205
Signed-off-by: egafford <egafford@redhat.com>
2019-11-08 12:15:02 -05:00
Sébastien Han f78ed36539 Merge pull request #4131 from leseb/osd-fs-flag
ceph: remove topologyAware CRD option
2019-11-06 15:08:21 +01:00
Madhu Rajanna 9b368ef15c CSI: Create CSIDriver Object
This will be helpful to list the CSI drivers
deployed in the kubernetes cluster. if we have
N number of CSI drivers deployed in the cluster,
the user can query kubectl get csidriver and get
the list of registered CSI drivers and it requires
kube 1.14+

This removes the deployment of Attacher sidecar container,
as we are setting the attacher required to false during
the CSIDriver object creation.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-11-06 11:18:03 +05:30
Travis Nielsen 47764715fe ceph: remove the location from the cluster CR
The topology of the cluster should be based on the node labels rather
than a setting in the cluster CR. This allows a much richer and more
dynamic topology to be configured. The location will now be ignored
if specified in the cluster CR.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-11-04 23:07:13 -07:00
Travis Nielsen 3767d6e14b tests: initialize the cluster-specific rbac properly
The integration tests were creating several namespace-specific resources
in the system namespace instead of the namespace with the cluster. This
was only affecting the rook-ceph-osd and rook-ceph-mgr service accounts,
which hadn't been exercised until the nodes were queried by osds for
topology awareness.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-11-04 23:07:13 -07:00
Sébastien Han ef6815ebfa ceph: remove topologyAware CRD option
We removed the topologyAware CRD option since it was redundant with the
use of an OSD being backed by a PVC.
So now, if an OSD is backed by a PVC we assume the topology aware
decision and will discover zone and region labels on that host.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-11-04 09:53:14 -07:00
Travis Nielsen e32729269f ceph: clean up block integration tests more reliably
The block integration tests are a source of intermittent failures
in the CI. The PVCs were not being confirmed as removed before the
pools were deleted. Then the pool would not be removed since there
might still be a block image from the PVC that wasn't deleted yet.
Now the tests will ensure the PVCs and their block images are
removed before the pool is deleted.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-10-30 15:37:35 -06:00
Sebastian Wagner b2fe1b951d ceph: Add removeOSDsIfOutAndSafeToRemove to CRD
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-10-25 15:57:32 +02:00
Sébastien Han eccea9fa05 ci: more debug
When we give up on waiting for the pod to be running which describe it
to see what's wrong.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-10-22 15:14:28 +02:00
travisn 879971f19a ceph: create object user immediately if obj store available
Creating an object user was always waiting at least 15 seconds before
attempting to create the user. With this change the operator will check
immediately if the object store is already initialized instead
of waiting for the initial 15 seconds delay to elapse.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-19 22:46:17 -06:00
travisn c4210237cb tests: update tests for apps/v1 apiVersion
K8s 1.16 requires apps/v1 instead of the old extensions/v1beta1 for the
apiVersion of the deployment. The tests were failing when testing on
K8s 1.16 without this change

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-19 12:46:00 -06:00
Travis Nielsen 000392533c Merge pull request #4022 from sebastian-philipp/validation-reservePoolsOnDelete
Ceph CRD Validation: Add reservePoolsOnDelete
2019-10-17 09:43:27 -06:00
travisn 979b6fd2cb tests: use kubectl create instead of apply
Testing if the create does any better in the tests than apply.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-15 17:13:25 -06:00
travisn f5eb11d863 tests: add logging to track down file test cleanup issue
Adding more logging until we can track down the file-test pod
cleanup issue

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-15 17:13:25 -06:00
Blaine Gardner 70810dd55a ceph: osd: do not init ceph.conf for dir OSDs
Just as with the mon, mgr, mds, rgw, and rbd-mirror daemons, do not
generate a ceph.conf in an init container for directory-based OSDs.
Instead use the mon config database and the commandline to supply all
the needed arguments for running these OSDs.

Also generate a keyring secret to mount to OSD pods. Use this
secret for directory-based OSDs for now with the intention to
use this for other OSDs in the future.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-10-15 12:12:46 -06:00
travisn d1680b2cca tests: ensure cluster finalizer removed during cleanup
The tests must ensure that the cluster is cleaned up so that
other test suites will not be affected by cleanup of a previous
test suite. Removing the cluster finalizer is critical to this
cleanup.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-14 09:29:46 -06:00
travisn a92850b307 tests: simplify filesystem tests and client pod deletion
The filesystem test deletes the client test pod by deleting the entire yaml
and sometimes hangs the integration tests. This is the most common intermittent
error in the CI. Now the deletion will happen more directly with a pod delete
command. If it does still fail deletion at least the deletion should timeout
sooner.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-14 09:29:45 -06:00
Sebastian Wagner b4b1182d2e Ceph CRD Validation: Add reservePoolsOnDelete
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-10-01 16:10:51 +02:00
RAJAT SINGH 4a02c568e7 Added validation for cephBlockPool,cephfs and cephnfs.Added changes in ceph_manifest.go and resources.yaml according to common.yaml.
Signed-off-by: RAJAT SINGH <rajasing@redhat.com>
2019-09-25 15:42:07 +05:30
Sebastian Wagner 82329a0bc6 Ceph CRDs: sync between copies
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-09-23 09:57:49 +02:00
Sebastian Wagner 965dc93f11 CephCluster CRD: Added network.provider to validation
(and `network.selectors`)

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-09-23 09:57:05 +02:00
Travis Nielsen f96960cfcc Merge pull request #3904 from sebastian-philipp/crd-validation-disruptionManagement
Fix CRD Validation: disruptionManagement and mgr modules
2019-09-20 17:06:45 -06:00
Sebastian Wagner 1987480dc5 Added missing properties
* volumeClaimTemplate
* storageClassDeviceSets
* external.enable

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-09-20 09:55:46 +02:00
Sebastian Wagner f66f6c1ce3 disruptionManagement: Added missing CRD validation
Also:
* `cluster.yaml`: spec.mgr.modules is not explicily nullable
* Removed `required: mon` in `ceph_manifests.go`

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-09-20 09:55:46 +02: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 9c86f40a6e Merge pull request #3724 from leseb/disable-flex
operator: ceph disable flexdriver
2019-09-18 10:08:07 +02: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
Sébastien Han bc6dcb9995 ceph: bump to v14.2.4
v14.2.4 just got released so let's use it.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-17 15:08:15 +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
travisnandAshish Ranjan 638b591535 ceph: Adds support for MDB controller and machineLabel controller
Add support for MachineDisruptionBudget controller and MachineLabel controller required for fencing
in OpenShift. This will ensure that machines are only fenced and OSDs are only stopped
when Ceph is in a healthy state.

Co-authored-by: Ashish Ranjan <aranjan@redhat.com>
Signed-off-by: travisn <tnielsen@redhat.com>
2019-09-06 16:32:06 -06:00
Travis Nielsen 49c516916e Merge pull request #3781 from rohantmp/topology
Fix topologyAware on PVC-based OSDs
2019-09-06 13:59:22 -06:00
Travis Nielsen fe4874dc77 Merge pull request #3769 from leseb/mgr-modules
Ceph: Ability to enable pg_autoscaler mgr module via CRD
2019-09-06 13:34:05 -06:00
Rohan CJ f8b7537830 Fix topologyAware on PVC-based OSDs
Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2019-09-06 23:17:01 +05:30
travisnandSébastien Han c30cc697c7 ceph: ability to enable mgr module via CRD
We can now enable via the cluster CR any manager module with a
setting under the new mgr element

mgr:
  modules:
  - name: pg_autoscaler
    enabled: true

Co-authored-by: Sébastien Han <seb@redhat.com>
Co-authored-by: travisn <tnielsen@redhat.com>
Signed-off-by: travisn <tnielsen@redhat.com>
2019-09-06 11:32:51 -06:00
Umanga Chapagain 0caedcf4d6 updating additionalPrinterColumns for CephFS
- Renamed MDSCOUNT to ActiveMDS & updated Description
  This was to remove the confusion about what the count
  is actually about (Active or Active+Standby).

Signed-off-by: Umanga Chapagain <chapagainumanga@gmail.com>
2019-09-06 11:38:33 +05:30