Commit Graph
493 Commits
Author SHA1 Message Date
Sébastien Han 9a5bd4f9d5 ci: add more verbosity
If pools are found, let's print them.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-03-05 12:37:44 -07:00
Sébastien Han 9a8d539d57 ceph: use crd subressource
The .metadata.generation field is updated if and only if the value at the .spec subpath changes.
Additionally, if the spec does not change, .metadata.generation is not updated.
This is a must-have for the controller-runtime work, if we don't have
this, the generation field will always be incremented, resulting in a
endless reconcile loop.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-03-05 12:37:44 -07:00
Travis Nielsen 8493f9bc64 ceph: nautilus tests run on 14.2.7 instead of latest release
The CI is failing currently in the OSD-on-pv scenario due to a change
in v14.2.8. Until that is resolved, we need to unblock the tests
by running against v14.2.7.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-05 12:01:47 -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
Sébastien Han dab9233c8b ceph: add CRD setting for pool size 1
As of Octopus, Ceph will prevent you from creating a pool with a
replica size of 1. Allowing such pool could lead to data loss, so enable
the new option: requireSafeReplicaSize: false if you are **ABSOLUTELY**
certain that is what you want.

Closes: https://github.com/rook/rook/issues/4889
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-02-25 16:28:58 +01:00
Travis Nielsen 607e900f2c ceph: increase timeout for file test pod start
The integration tests have failed intermittently due to needing just
a little longer to start the file test pod. This increases the
wait timeout.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-02-19 13:34:09 -07:00
Sébastien Han 220ffbc07c Merge pull request #4853 from travisn/test-focus-csi
Focus integration tests on the CSI driver and less on Flex
2020-02-18 14:34:46 +01:00
Satoru Takeuchi a0c21b237e tests: enhance README.md
- setting config path is necessary between kubeadm.sh and helm.sh
- fix the path of integration test binary

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-02-18 16:31:18 +09:00
Travis Nielsen 10ddf4b0df tests: retry wiping devices if failed
The job to wipe devices fails the integration tests periodically.
Now the job will be retried once if it fails to retry wiping the
disks.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-02-17 22:27:13 -07: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
Travis Nielsen a960e263db ceph: remove obsolete longhaul tests
The longhaul tests have not been run for a very long time,
on the order of two years. The intention is to get them running
again, but until then it is better to purge the obsolete sources
than to attempt to keep them building. We'll need to rewrite them
when they are restored.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-02-17 14:11:39 -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
Ashish Ranjan af4cc2096d Ceph: update localPV.sh to clean localPVs before applying
This commit updates localPV.sh to clean existing localPVs before applying the new one.

Signed-off-by: Ashish Ranjan <ashishranjan738@gmail.com>
2020-02-12 15:03:35 +05:30
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 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 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
Ashish Ranjan 2495198409 ceph: Adds shell script for provisioning localPath PVs
This commit adds a shell script to provision localPath PVs over the
disks in the nodes for OSDs and random host directoris for mons.

Note: currently it is hardcoded to select disk of `/dev/xvdb`.

Signed-off-by: Ashish Ranjan <ashishranjan738@gmail.com>
2020-02-04 16:05:52 +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
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
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 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
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 f5edde3b80 Merge pull request #4503 from travisn/test-k8s-1.17
Run integration tests on K8s 1.17
2020-01-09 18:08:26 -08:00
Travis Nielsen 9a078bf9e6 minio: remove from rook
The minio operator has not had community support nor
any updates since being added to Rook. Support is being
removed from Rook due to this lack of community interest.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-01-08 15:45:21 -08: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