Commit Graph
364 Commits
Author SHA1 Message Date
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
Elise Gafford 2ca0d8f93d ceph: add cleanupPolicy to cephcluster spec
In order to perform full automation of cephcluster deletion safely
and protect against catastrophic data loss, the end user must be
able to signify that they intend to irrecoverably delete the data
in their cluster. The cleanupPolicy field of the cluster spec is
intended to communicate this. This patch does not implement
automated deletion, but only creates the spec field and the
safety feature of halting orchestration other than deletion on a
cluster with a set cleanup policy value.

Partially-fixes: #3222
Signed-off-by: Elise Gafford <egafford@redhat.com>
2020-03-30 19:11:54 +05:30
Travis Nielsen bef11804b8 flex: enable flex driver in the integration tests
The flex agent was mistakenly disabled in the CSI config change
in this PR: https://github.com/rook/rook/pull/5032. The agent must
be enabled for integration tests.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-27 16:26:22 -06:00
Sébastien Han 6f70c9bd5a Merge pull request #5101 from cybozu-go/check-lv-availability
ceph: check LV availability by "ceph-volume lvm list"
2020-03-27 16:43:48 +01:00
Travis Nielsen cf7a910df6 Merge pull request #5062 from travisn/test-14.2.8
Run Ceph integration tests on latest nautilus
2020-03-27 09:21:28 -06:00
Travis Nielsen 9cecf9e4d5 ceph: better attempt in integration tests to wipe the disks
The integration tests are failing to run when the disks
are not properly cleaned up and the bluestore label
is still found. Now we run sgdisk to more completely
zap the disk.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-27 07:51:10 -06:00
Travis Nielsen eb1e4beff8 ceph: run integration tests on latest nautilus
Run the tests on latest nautilus with the tag ceph/ceph:v14 so we
are constantly testing on the latest release.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-27 07:48:54 -06:00
morimoto-cybozu ab83738aac ceph: fix device path passed to "ceph-volume inventory"
This commit fixes the argument for "ceph-volume inventory".
When a device "/dev/mapper/foo" is being checked for its availability,
the argument should not be "/dev/foo" nor "/dev/dm-1".

Signed-off-by: morimoto-cybozu <kenji_morimoto@cybozu.co.jp>
2020-03-27 11:24:47 +00:00
Umanga Chapagain 0e932c15eb Ceph: add CSI configurations to ConfigMap
This commit adds all the CSI configurations to ConfigMap.
This configMap can be used in combination with Env Vars
to configure Ceph CSI drivers in rook.

Signed-off-by: Umanga Chapagain <chapagainumanga@gmail.com>
2020-03-27 15:17:30 +05:30
Sébastien Han a044b27650 ci: fix MockExecuteCommandWithOutput mock definition
With the recent exex update we missed this one.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-03-25 17:24:30 +01:00
Travis Nielsen da3bf49b61 Merge pull request #5043 from cybozu-go/remove-unnecessary-napespace-fields
remove unnecessary namespace fields
2020-03-20 17:18:21 -06:00
Sébastien Han ca0a30f38d ceph: convert Filesystem 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/4940
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-03-19 23:34:58 +01:00
Travis Nielsen e8f9cfcb71 exec: always write commands to debug log
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-19 07:49:54 -06:00
Travis Nielsen f2ecaa2bda exec: remove the unused actionName param
The helpers for executing a process have long required an actionName
param which is not being used. Now we remove the old param
while also cleaning up various other usages of the exec
package.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-19 07:49:53 -06:00
Travis Nielsen 84b8cdcf75 exec: simplify the exec package from unused methods and logging
The methods and arguments to the exec methods are not all used anymore.
This cleans up the methods to only what is necessary to improve
the readability and maintainability.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-19 07:49:53 -06:00
Travis Nielsen 18b0e7d295 ceph: scrub ceph commands to write actions to the log
The ceph commands are now only written to the log in debug mode.
For commands that change the system state we now ensure that
a useful log entry is written. If all the details of the ceph
commands are needed, debug logging should still be enabled.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-19 07:49:53 -06:00
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 e3b3aa7702 ci: bump upgrade to 1.2.6
Let's upgrade from 1.1.9 to 1.2.6

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 9c5c78cf01 Merge pull request #5025 from jmolmo/blinking_lights
Ceph: Added rook manager module rights for read pod logs
2020-03-16 13:57:13 -06:00
Travis Nielsen 017a560db3 Merge pull request #5021 from samkulkarni20/yb-mem-limits
YugabyteDB: Add resource limits to YugabyteDB pods
2020-03-16 11:12:07 -06:00
Juan Miguel Olmo Martínez c87a01bb8c Ceph: Added rook manager module rights for read pod logs
This is needed to allow the ceph manager rook module to read the output
of the <lsmcli> command used to switch disk identification light on/off on
physical disk devices

[test ceph]

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
2020-03-16 18:03:23 +01:00
Sameer Kulkarni 909770a346 YugabyteDB: Add resource limits to YugabyteDB pods
Current YugabyteDB operator code creates Master and TServer pods without any resource requests/limits (specifically CPU and memory).
This causes the operator to run into soft/hard memory limit issue. The fix adds recommended resource requests and limits as defaults to the pods it creates.

Closes: https://github.com/yugabyte/yugabyte-db/issues/3884
Signed-off-by: Sameer Kulkarni <samkulkarni20@gmail.com>
2020-03-14 12:23:14 +05:30
Travis Nielsen 7de388ce92 ceph: grant access to the mgr to delete pods
The Ceph mgr modules need access to restart the daemon pods
when the configuration changes for the daemons.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-13 17:08:27 -06:00
Travis Nielsen dabf0b6618 yugabyte: tests should use image built by rook
The integration tests for yugabyte were pointing to an image
outside of the rook repo. Since that image changed unexpectedly
it broke the rook integration tests. The tests need to use
the image built by rook.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-11 17:44:05 -06:00
Sébastien Han fd33d64b4f ci: do not hide pool deletion error
Print the error if any.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-03-06 14:35:23 +01:00
Travis Nielsen 5ea5674f71 ceph: gather operator logs on pool test failure
The operator logs are necessary for troubleshooting why the
pools may still exist at the end of the integration tests.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-05 15:39:41 -07: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
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
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 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