Commit Graph
617 Commits
Author SHA1 Message Date
Blaine Gardner f2bc23c33e Merge pull request #4916 from SUSE/drive-groups
Ceph: provision OSDs using Drive Groups
2020-07-14 18:08:45 -06:00
Travis Nielsen 3d3986ee02 Merge pull request #5785 from prksu/fix-nfs-on-openshift
nfs: fix nfs issue on openshift
2020-07-14 11:06:47 -06:00
Blaine Gardner 7117fc12b7 ceph: osd: add drive groups spec to cluster CR
Add the ability to provision Ceph OSDs with Drive Groups.
This adds Drive Groups to the CephCluster CRD, and it sets code
in place for propagating this config to the OSD provisioning pod.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2020-07-14 09:43:03 -06:00
Ahmad Nurus S 1659687d37 nfs: fix nfs issue on openshift
Signed-off-by: Ahmad Nurus S <prksu.sh@gmail.com>
2020-07-14 18:11:39 +07:00
Travis Nielsen cb8111c042 ci: check for official build string properly
The version of Jenkins has changed such that setting the official build env
var is no longer comparing correctly. Now we will only assume the env
var is set by the PR to false, therefore the tests need to compare
against false instead of true.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-07-13 13:53:57 -06:00
Sébastien Han ccb52b84e6 ceph: configurable status checks and livenessprobe
This commit allows us to configure status check for each daemon:

* "mon": health check on the ceph monitors (quorum)
* "osd": health check on the ceph osds
* "status": ceph health status check

Each check is controlled by the following settings:

* disabled: whether to disable the check (default: false)
* internal: interval to run the check
* timeout: only valid for mons, is the timeout for unresponsive mon
before failling over.

Example to disable the status health check:

```yaml
healthCheck:
  daemonHealth:
    status:
      disabled: true
```

As part of that, pod's livenessprobe can now be configured via the
following settings:

* disabled: whether to enable or not
* probe: override the current probe in place by a new one

```yaml
healthCheck:
  livenessProbe:
    mon:
      disabled: true
```

Closes: https://github.com/rook/rook/issues/5772
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-10 19:21:59 +02:00
Sébastien Han 6de1ad8575 ceph: resync crds
Add missing API fields.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-08 09:28:40 +02:00
Travis Nielsen dbae36b2bb ceph: update to the latest octopus release
Update the base operator image and cluster examples to use the latest
octopus release v15.2.4. Also cleanup some old examples and unit tests
that were still based on mimic.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-07-06 12:11:47 -06:00
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
Travis Nielsen 9332d31196 Merge pull request #5755 from travisn/skip-mgr-test-in-master
ceph: Add logging for mgr integration test suite in master
2020-07-06 08:24:31 -06:00
Ahmad Nurus S f7f8270f58 nfs: rewrite nfs operator controller to use controller-runtime
Signed-off-by: Ahmad Nurus S <prksu.sh@gmail.com>
2020-07-03 14:33:25 +07:00
Travis Nielsen 5ec75c16e4 ceph: skip mgr integration test suite in master
The master CI is not expected to run the mgr test suite, which
runs against ceph master.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-07-02 17:00:38 -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
Travis Nielsen 6c0d4057b3 Merge pull request #5045 from vbnrh/rook-admission-controller
ceph: Adding support for admission controllers
2020-06-25 09:56:39 -06:00
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
Satoru Takeuchi c8c05ed7b9 ceph: fix the wrong document of tuneDeviceClass
The tuning parameter of slow device is defined as "tuneDeviceClass".
However, it's written in the document as "tuneSlowDeviceClass".

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-06-24 00:31:14 +00:00
Sébastien Han c7f255a0e8 ceph: add the ability to set any pool property
We can now explicitly set any property on a given pool by using the new
Property field in the CephBlockPool Spec.

Also, this fixes the case where both `CephBlockPool` and `CephCluster`
are created at the same time. When Rook creates the pool, the cluster is
still being bootstrapped and the global option
`osd_pool_default_pg_autoscale_mode` has not bee set yet. So the pool
gets created but its `pg_autoscale_mode` property is set to `warn`
instead of `on`.

Closes: https://github.com/rook/rook/issues/5608V
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-06-17 10:08:00 +02:00
Travis Nielsen 609d43d050 Merge pull request #5640 from binoue/fix-error-message
ceph: fix error message
2020-06-10 17:24:26 -06:00
binoue b52b59669f ceph: fix error message
This commit fixes an error message

Signed-off-by: binoue <banji-inoue@cybozu.co.jp>
2020-06-11 07:10:29 +09: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
Sébastien Han c799e11032 ceph: enhancement cleanup with disks
Now, we can not only cleanup monitor data, logs and crashes but the
disks too. As part of the cleanupPolicy CR spec, we have a new setting
called sanitizeDisks which holds more details:

* confirmation: the confirmation message to sanitize disks,
use "yes-really-sanitize-disks" to confirm

This will **only** wipe the metadata, so it's a fast cleanup allowing
you to re-install later but won't remove all the data from the drive.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-05-27 18:14:02 +02: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
Satoru Takeuchi abdac2b412 tests: remove the unused fields of a struct
There are the unused fields in `struct CommandArgs`. These can be removed.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-05-13 20:52:54 +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
Sébastien Han cecbfcfba6 Merge pull request #5372 from leseb/obc-independent-mode
ceph: add support for OBC on external cluster
2020-05-06 10:30:15 +02: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
Sébastien Han b86bb9c528 ceph: add support for OBC on external cluster
We can now consume an external s3 endpoint which is not managed by Rook.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-05-04 18:14:26 +02: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
Blaine Gardner 2bf340ff0b ceph: append 00 to rook-privileged PSP name
Adding seccomp annotations to the PSP has made Kubernetes start choosing
the recommended Kubernetes "default" PSP over the Rook privileged PSP,
causing operator start errors. Append 00 (double zero) to the beginning
of the PSP name to make sure it is one of the first PSPs checked by
Kubernetes and will be matched before the "default" one.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2020-04-24 10:21:19 -06:00
binoue 18cde4596c ceph: update helm chart manifests
Currently, helm chart is little outdated and has differences with
example/common.yaml.
This commit modifies both manifests to use same resources.

Signed-off-by: binoue <banji-inoue@cybozu.co.jp>
2020-04-23 14:21:32 +09: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
Satoru Takeuchi bf27b0f5c4 ceph: allow to set the device for OSD in the integration test
The device name for OSD is fixed to /dev/xvdc. It works fine in the CI.
However, the name would be different in the developer's local environment.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-04-17 23:24:03 +09:00
Travis Nielsen 1c1591c847 Merge pull request #5261 from cybozu-go/missing-requiresafereplicasize
Ceph: Add requireSafeReplicaSize in CephObjectStore CRD
2020-04-16 10:44:46 -06:00
zoetrope babb55cc15 ceph: add requireSafeReplicaSize to CRD
add requireSafeReplicaSize field to CRD in upgrade-from-v1.2-crds.yaml and ceph_manifets.go

Signed-off-by: zoetrope <a.ikezoe@gmail.com>
2020-04-16 15:18:00 +09:00
Suraj Deshmukh 2f6205b2f6 PSP: Add seccomp annotations
This commit adds seccomp annotations to the PSP shipped with Rook
Operator. In this way the operator when deployed will be more secure and
will only be allowed the syscalls defined the runtime's seccomp profile.

Signed-off-by: Suraj Deshmukh <surajd.service@gmail.com>
2020-04-15 20:10:30 +05:30
Sébastien Han 2bd017102b ci: add retry when deleting rbd image
Sometimes the image still has watchers so let's retry the deletion.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-04-15 09:12:57 +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
Satoru Takeuchi 6a09cc0177 ceph: remove unnecessary lvremove in test
LVs in a VG are removed with vgremove. So lvremove before vgremove
is not necessary.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-04-13 14:49:05 +09:00
Satoru Takeuchi 7e4f32790d ceph: prevent pre-exisiting lvms from wipe
Ceph integration test tries to wipe all lvms including
the ones that are not related to this test.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-04-07 14:09:00 +00:00
Travis Nielsen 948c0328bd Merge pull request #5162 from travisn/csi-v2.0.1
Enable the Ceph CSI v2.0.1 driver by default in Rook
2020-04-03 13:31:59 -06:00
Travis Nielsen b8e0d8902c Merge pull request #4077 from leseb/rook-multus
ceph: add multus support
2020-04-03 11:14:08 -06:00
Chu Yong Mark Lee a018d89d9c csi: Update cephcsi driver to v2.0.1
Update cephcsi driver to v2.0.1 to allow nodes with
Ceph persistent volumes to shutdown cleanly. This requires
an additional bind mount (/run/mount) in cephfsplugin
and rbdplugin templates.

Signed-off-by: Chu Yong Mark Lee <markleechuyong@gmail.com>
2020-04-03 11:05:41 -06:00
Sébastien Han 20d1543507 ceph: add multus support
You can now use Rook along with Multus. Multus must be up and running
and the right ressources must exist such as NetworkAttachmentDefinition
CR.
The Cluster CR spec has new fields to work with multus:

network:
  provider: multus (or 'host' for hostNetworking)
  selectors:
    public: NetworkAttachmentDefinition name
    cluster: NetworkAttachmentDefinition name

If only a single NetworkAttachmentDefinition is provided Rook will use
both anyway for the Ceph traffic.

Please refer to the doc to learn more.

Closes: https://github.com/rook/rook/issues/4716
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-04-03 18:00:15 +02:00
Rohan CJ ecef80eda5 Ceph: Use both "apps" and "extensions" for deployment RBAC.
Some versions of k8s can optionally enable extensions after deprecation.
This could lead to rbac denials when trying to perform operations on deployments

Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2020-04-03 19:10:45 +05:30
Santosh Pillai 1673291589 ceph: Integration Tests: moving GetCleanupPod() and GetCleanupVerificationPod() methods out of CephManifests interface
The CephManifests interface is intended for manifests that install the product (RBAC, CRDs, operator, etc). These cleanup methods are more about test code. The test code needs to behave the same whether it is a normal install or an upgrade. We don't need to version it differently for upgrades between the CephManifestsMaster and CephManifestsV1_1 implementations

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2020-04-03 13:54:52 +05:30