Commit Graph
777 Commits
Author SHA1 Message Date
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
Travis Nielsen dbfcef8c19 ceph: set min size to 0 on pool replication
The replication and erasure code settings are mutually exclusive
so must both be treated as optional by the schema validation.
The minimum must be set to 0 to treat them as optional.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-02-06 13:48:52 -07:00
Sébastien Han cface95317 ceph: ability to set target_size_ratio
target_size_ratio is used the tell the Ceph cluster the excepted
occupancy of a pool in the cluster.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-02-06 09:13:47 +01: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 37b442a308 localPV: update localPath PV with size of 10G
This commit updates the localPath PV to use size of 10G and use /dev/xvdc as mountpoint for disks.

Signed-off-by: Ashish Ranjan <aranjan@redhat.com>
2020-02-04 22:28:20 +05:30
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
Nizamudeen 4b55a74ac4 ceph: Implementing Conditions on rook-ceph
Fixed conditions getting resetted after the operator restart.
Did the changes which required to implement conditions on the rook ceph cluster
Conditions will eliminate the current status.State and incorporates a type which
provides much more description to the current status of the cluster.

Signed-off-by: Nizamudeen <nia@redhat.com>
2020-01-30 10:21:11 +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 8043afb165 Merge pull request #4710 from travisn/tests-skip-upgrade-checks
Skip the upgrade checks in integration tests
2020-01-28 16:31:33 -07:00
Madhu Rajanna 57c9002b92 integration: update CSI clusterRoles
Updated rbd-external-provisioner-runner and
cephfs-external-provisioner-runner CSI
clusterroles inintegration tests.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-01-28 23:50:23 +05:30
Madhu Rajanna 21e7a61ffd CSI: Add CSI clusterrole for upgrade testing
Add required clusterrole for CSI to work when rook
upgraded from 1.2 to 1.3

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-01-28 23:50:23 +05:30
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
Travis Nielsen d40cb217ae Merge pull request #4694 from egafford/secure-port-for-ceph-object-manifests
ceph: add securePort values for objectstore integration tests
2020-01-27 14:49:47 -07:00
Elise Gafford d7906266e1 ceph: remove validation on SecurePort for k8s <= 1.13
Versions of k8s prior to 1.14 do not support the nullable field in
CRD properties. As k8s 1.13 remains part of our support matrix and
as this field must remain nullable, we must remove CRD validation
of SecurePort. Range validation of this field has been moved into
the logic of rgw.validateStore.

Fixes: #4693
Signed-off-by: Elise Gafford <egafford@redhat.com>
2020-01-27 13:49:35 -05:00
Sébastien Han c1534e951a ci: unblock wipe job
Somehow the job was stuck on 'fdisk -l', the logic to wipe the block
device changed and we don't need that command anymore.
We wipe the disk in the PV loop.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-24 12:18:16 +01:00
Sébastien Han 227d2d527a ceph: osd store refactor
Multiple things:

1. We removed all the function/methods/tests that were used to
create and manage rook legacy OSDS as well as bringing support to
Bluestore OSD only.
It also fixes various go-lint issues in the respectives files.

2. use c-v inventory to detect available devices:
Now we rely on the 'ceph-volume inventory' command to tell us if a
device is available or not.

3. implement raw mode for osd on pvc
When an OSD will be bootstrap on a PVC, the new c-v raw mode will be
used. It consists of putting block, db and wal under the same device.
Here LVM is out of the picture and the raw device is used as is. The
implementation is backward compatible so existing OSD on PVC will LVM
will continue to operate.

Closes: https://github.com/rook/rook/issues/4363
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-23 19:13:09 +01:00
Blaine Gardner 3cab1cf4fd Merge pull request #4608 from SUSE/upgrade-test-v1-1-to-v1-3
upgrade v1.0->v1.1->v1.2->v1.3 in upgrade test
2020-01-15 11:36:46 -07:00
Sébastien Han 81dd279062 Merge pull request #4653 from leseb/pick-14.2.6
ceph: bump to 14.2.6
2020-01-15 17:44:52 +01:00
Sébastien Han dec0c7d4b0 ceph: bump to 14.2.6
14.2.6 is released, let's use it!

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-15 11:02:44 +01:00
Sébastien Han 0e05917dd8 Merge pull request #4674 from travisn/multiple-test-versions
Allow integration tests in minimal config to run on multiple versions
2020-01-14 10:17:36 +01:00
Travis Nielsen 47840b9fef tests: parsing flags causing integration test failure locally
Running integration tests locally on k8s 1.13 was causing an error
with parsing the command line flags. We can't call flags.Parse()
from an init() method.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-01-13 16:56:48 -07: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
Blaine Gardner 2e242ca886 ceph: upgrade test versions v1.0->v1.1->v1.2->v1.3
In the Ceph upgrade integration test, upgrade from Rook v1.0 with Ceph
Mimic v13 to install legacy disk-based OSDs. Then upgrade Ceph to
Nautilus, then Rook to v1.1, then v1.2, then v1.3 (master currently) to
make sure that Rook is able to run legacy OSDs created without
ceph-volume.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2020-01-13 08:56:35 -07:00
Blaine Gardner c40763c5c6 integration: retry pod logs with kubectl on fail
Sometimes we fail to get logs for pods using this method, notably the
operator pod. It is unknown why this happens. Pod logs are VERY
important, so try again using kubectl.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2020-01-13 08:56:33 -07:00
Yu Chih 1f73d59dea ceph: Add validation to cluster spec rgw port range
When creating a CephObjectStore object, operator will
use .Gateway.Port or .Gateway.SecurePort to create k8s
Service object, if the port is invalid, the Service
will not be created.

Note .Gateway.Port/.Gateway.SecurePort should in 1~65535,
however .Dashboard.Port is 0~65535 because 0 will use
default setting for .Dashboard.Port and there is no
such mechanism for .Gateway.Port/.Gateway.SecurePort

Closes: https://github.com/rook/rook/issues/4574
Signed-off-by: Yu Chih <secret104278@gmail.com>
2020-01-13 18:00:34 +08:00
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