Commit Graph
912 Commits
Author SHA1 Message Date
Travis Nielsen c78e6a9e20 ceph: set active mgr label on mgr services
Other resources such as the service monitor need to match
the labels on the services to the active mgr, thus the active
mgr name is now set on the labels for the metrics service
and dashboard service.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-03-18 16:37:01 -06:00
Arun Kumar Mohan 822a5194da ceph: fix for the random script failures because of open file issue
Script's tests were failing randomly because of an unclosed file
exceptions.

Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
2021-03-18 20:59:24 +05:30
Travis Nielsen 7b3244a324 Merge pull request #7390 from travisn/refactor-tests
ceph: Refactor integration tests for simplification
2021-03-17 13:51:37 -06:00
Travis Nielsen 64e28af741 ceph: allow flex driver and discovery to be enabled with configmap
For testing purposes, we need to configure the flex driver
and discovery daemon with the operator settings configmap.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-03-17 08:39:26 -06:00
Travis Nielsen 933113eac8 ceph: remove obsolete storeType setting
All clusters are configured with bluestore as the store type
therefore we can remove the settings where mentioned in the
docs and dead code.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-03-17 08:39:25 -06:00
Frank Ritchie 7fcd0ab3d9 ceph: mark maxSize as optional
This is a follow up to:

https://github.com/rook/rook/pull/7397

Looks like I forgot to mark maxSize as optional.

Signed-off-by: Frank Ritchie <12985912+fritchie@users.noreply.github.com>
2021-03-17 09:43:31 -04:00
Anmol Sachan f84cbb47fe ceph: add osd slow ops alert
This commit adds an alert that notifies the users about OSD
requests taking too long to process.

Signed-off-by: Anmol Sachan <anmol13694@gmail.com>
2021-03-16 15:40:28 +05:30
Sébastien Han ab50e75e08 Merge pull request #7402 from subhamkrai/yaml-ignore
ceph: ignore monitoring folder from yamllint
2021-03-16 10:46:17 +01:00
Sébastien Han 31db03fece ceph: auto-gen crds
Finally! We can now stop editing manually our crds definition. Simply
run `make crds-gen`. These two files:

* `cluster/examples/kubernetes/ceph/crds.yaml`
* `cluster/charts/rook-ceph/templates/resources.yaml`

will be autogenerated for us.

We rely on the controller-gen tool, it reads our API definitions from
`pkg/apis/` and produces the CRD files accordingly.

It uses "markers" to add extra yaml fields to the CRD, for instance we
have a lot fields with:

```
nullable: true
x-kubernetes-preserve-unknown-fields: true
```

The corresponding API type markers are:

```
// +kubebuilder:pruning:PreserveUnknownFields
// +nullable
```

For more API convention see
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#optional-vs-required
and for the markers see: https://book.kubebuilder.io/reference/markers/crd-validation.html

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-16 09:16:24 +01:00
subhamkrai acfbc78392 ceph: ignore the monitoring folder from yamllint
this commit adds the monitoring folder to
yamllint ignore list.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-03-16 12:33:37 +05:30
Frank Ritchie 9ae699d632 ceph: set pool quota with k8s quantity format
This is a follow up to:

https://github.com/rook/rook/pull/7264

which added pool quotas. It was stated that it would be nice to
be able to set pool max_bytes quotas using standard k8s quantity
formats rather than an integer representing the number of bytes.

I was too busy at the time to make the changes. This PR adds the
functionality.

Signed-off-by: Frank Ritchie <12985912+fritchie@users.noreply.github.com>
2021-03-15 19:26:41 -04:00
subhamkrai b46e31dbee ci: add gh action for yaml linter
this commit adds gh action for yaml linter.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-03-11 08:23:18 +05:30
Travis Nielsen a1c6a706f1 ceph: configure resources for the mgr sidecar
The mgr sidecar container has a new mgr-sidecar section
for specifying resources if desired.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-03-10 08:37:17 -07:00
Travis Nielsen e7331b0191 ceph: multiple mgrs have antiaffinity across hosts or zones
If there are multiple mgrs running, the operator will automatically
add pod antiaffinity across hosts by default. For stretch clusters,
antiaffinity across the stretch failure domain (e.g. zones)
will be added. Required antiaffinity will be created unless the
test setting allowMultiplePerNode is set to true.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-03-10 08:37:17 -07:00
Travis Nielsen 388ff3e78b ceph: start sidecar to monitor active mgr
The mgr daemon may be failed over by ceph if the active mgr is not
responding and the standby mgr is available. If the active mgr changes
the services for the dashboard and metrics will be updated with a
label selector for the new active mgr. The services cannot direct
traffic to the standby mgr or else they will be incorrectly redirected
to the active mgr.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-03-10 08:37:17 -07:00
ushen 7e691af439 ceph: allow user decide num of mgrs
Allow user to decide how many mgrs to be used
by make mgr replicas configurable

Signed-off-by: shenjiatong <yshxxsjt715@gmail.com>
2021-03-10 08:29:14 -07:00
Madhu Rajanna 0a81ce2251 ceph: disable CSI GRPC metrics by default
The GRPC metrics exposed by both the provisioner pod
and the node plugin pod on some port. Provisioner pod
is running on the pod network and the daemonset pods
run on the host network. sometimes starting the GRPC
metrics by default can lead to node plugin pods
crashloopback state this is due to the port conflict.
Moreover, the GRPC metrics are not for the user it's
for the one which will help to debug the time taken
by cephcsi to serve each GRPC call. Enabling it by
default won't be a good idea. So the plan is to
disable it by default, If someone faces any issue it
can be enabled later at some point in time.

closes #7378

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-03-10 11:30:50 +05:30
Sébastien Han 128dc4cb79 Merge pull request #7325 from subhamkrai/cert-manager
ceph: use cert-manager for admission webhooks
2021-03-09 10:38:27 +01:00
subhamkrai d594a6c904 ceph: remove config-admission-controller.sh
this commit removes file `config-admission-controller.sh`
as we don't need this anymore and update the doc to point
`tests/scripts/deploy_admission_controller.sh` to start
admission controller.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-03-05 16:39:52 +05:30
Anmol Sachan 1532070a3e ceph: add osd flapping alert
This PR adds an alert that notifies the users if an OSD restarts
for 5 times under 5 minutes. Each restart corresponds to 2 changes
in the value of ceph_osd_up metric.

Signed-off-by: Anmol Sachan <anmol13694@gmail.com>
2021-03-05 16:22:16 +05:30
Travis Nielsen ec5691ee3a Merge pull request #7330 from thotz/updatecrdsforhealthcheck
ceph: update CRDs for healthcheck in crds.yaml
2021-03-03 08:20:59 -07:00
Sébastien Han e335851b96 Merge pull request #7273 from anmolsachan/BZ1904302
ceph: fixed prometheus query to avoid many-to-many match error
2021-03-03 11:30:13 +01:00
Santosh Pillai 1159455345 ceph: update CRDs for healthcheck in crds.yaml
Even though CRs for bucket health check was added, CRDs were missing from
crds.yaml file. So the health check always enabled for RGW.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2021-03-03 10:42:35 +05:30
Sébastien Han 8dfa99e01d ceph: rework multiple filesystem support
The upcoming Rook release 1.6 will support Ceph Pacific which introduces
stable support for multiple Ceph Filesystems in the same cluster. So we
now allow the creation of multiple Filesystem if the release is Pacific.

Also, we remove the Operator config flag which was not necessary.

Here I have 2 filesystems:

```
[root@rook-ceph-tools-6b4889fdfd-vncck /]# ceph fs ls
name: myfs, metadata pool: myfs-metadata, data pools: [myfs-data0 ]
name: myfs2, metadata pool: myfs2-metadata, data pools: [myfs2-data0 ]
```

```
  cluster:
    id:     cc747950-589a-4862-bad2-ff7de1217b1a
    health: HEALTH_WARN
            mons a,b,c are low on available space
            6 pool(s) have no replicas configured

  services:
    mon: 3 daemons, quorum a,b,c (age 2d)
    mgr: a(active, since 2d)
    mds: myfs:1 myfs2:1 {myfs2:0=myfs2-b=up:active,myfs:0=myfs-b=up:active} 2 up:standby-replay
    osd: 3 osds: 3 up (since 2m), 3 in (since 6d)

  data:
    pools:   6 pools, 717 pgs
    objects: 44 objects, 4.2 KiB
    usage:   46 MiB used, 90 GiB / 90 GiB avail
    pgs:     717 active+clean

  io:
    client:   1.8 KiB/s rd, 4 op/s rd, 0 op/s wr

  progress:
    Global Recovery Event (45s)
      [===========================.]
```

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-02 18:27:04 +01:00
Sébastien Han a134d1df6e Merge pull request #7336 from leseb/revert-vault-backend
ceph: revert kms VAULT_KV_VERS to VAULT_BACKEND
2021-03-02 10:44:43 +01:00
Sébastien Han e4c3a4cef7 ceph: revert kms VAULT_KV_VERS to VAULT_BACKEND
The vault env variable VAULT_BACKEND is read by the secret library so we
must not change it. This is reverting
ee6a03dfb8 with a few extra fixes for the
rgw code.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-02 10:08:39 +01:00
Anmol Sachan 136231a71f ceph: fixed prometheus query to avoid many-to-many match error
Ceph_daemon label includes references to a replaced OSD that cause a prometheus
ruleset to fail due many-to-many match error. The changes to this PR filters the
extra matching ceph_daemon time-series.

Signed-off-by: Anmol Sachan <anmol13694@gmail.com>
2021-03-01 17:26:05 +05:30
Blaine Gardner efa7d66d45 ceph: remove driveGroup support
Remove features and design that supports adding OSDs to Ceph clusters
via `spec:driveGroups`. Update the Ceph upgrade doc that informs users
who currently use Drive Groups (we believe there are none of these
users) how to migrate to using the `spec:storage` config.

Resolves https://github.com/rook/rook/issues/7275

Revert "ceph: fix drive group deployment failure"
This reverts commit 76f1d9944e.

Revert "ceph: osd: add drive groups spec to cluster CR"
This reverts commit 7117fc12b7.

Revert "design: ceph orchestrator module add/remove OSDs"
This reverts commit 178187d035.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-02-25 17:08:47 -07:00
Travis Nielsen ade67eb7ce Merge pull request #7302 from BlaineEXE/update-to-ceph-15.2.9
ceph: update build and examples to use v15.2.9
2021-02-25 13:56:27 -07:00
Blaine Gardner 818342cbfb ceph: update build and examples to use v15.2.9
There are still references to v15.2.7 in integration tests to allow
testing OSDs on partitions.

The newest dated Ceph image is ceph/ceph:v15.2.9-20210224

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-02-24 15:15:26 -07:00
Arun Kumar Mohan bc4dd24306 ceph: making changes to fix CI test failures
Changed the random port creation's max value from 255 to 254, as the IP
with value 255 fails.
Re-raise/propagate the 'ExecutionFailureException' exception so that we
don't end-up in ZERO exit value.

Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
2021-02-24 23:54:42 +05:30
Arun Kumar Mohan 5ce07b9559 ceph: fixed tests for standby mgr changes
Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
2021-02-24 23:54:42 +05:30
Arun Kumar Mohan f68529f31f ceph: enable external resource script to collect active and standby mgrs
Now 'create-external-cluster-resources.py' script will add standby mgrs
along with the active mgr while providing the output.
'MonitoringEndpoint' data-key will contain a comma separated list of
active followed by standby mgrs' IP addresses.

Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
2021-02-24 23:54:42 +05:30
Travis Nielsen 7404de7b38 Merge pull request #7264 from fritchie/pool-quotas
ceph: add ability to set pool quotas
2021-02-19 12:53:41 -07:00
Frank Ritchie a0488dac73 ceph: add ability to set pool quotas
This will allow setting ceph pool quotas in bytes and/or objects.

Ceph documentation: https://docs.ceph.com/en/latest/rados/operations/pools/#set-pool-quotas

Signed-off-by: Frank Ritchie <12985912+fritchie@users.noreply.github.com>
2021-02-19 13:49:25 -05:00
Sébastien Han 00e85bc53c Merge pull request #7271 from hookak/patch-2
docs: Delete 'rootPath' in cephfs storageclass yaml
2021-02-19 11:46:31 +01:00
jinhong.kim f519323524 docs: delete 'rootPath' in cephfs storageclass yaml
The pre-provisioned volume or static-PV support in cephfs-csi has changed.
Delete 'rootPath' field which is no longer used

Signed-off-by: Jinhong Kim <hookak25@gmail.com>
2021-02-19 07:13:34 +00:00
Taeuk Kim c0c4d41b47 ceph: correct fs yaml fields
Some MDS fields such as placement, resource belong to mirroring currently.
It corrects the fields location.

Signed-off-by: Taeuk Kim <taeuk_kim@tmax.co.kr>
2021-02-19 01:28:03 +00:00
Sébastien Han e99c122038 ceph: revert fail if mgr prometheus is not default
This reverts commit 1ed307cb09. In
8aaff235bb we have introduced the ability
to set a specific monitoring port so the block that fails if the port is
not the default 9283 is not needed anymore.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-16 16:55:37 +01:00
Sébastien Han fd0716a026 Merge pull request #7173 from leseb/fix-7168
ceph: add cephfilesystemmirrors CRD to 1.15
2021-02-09 16:31:25 +01:00
Sébastien Han df683a0c57 ceph: add cephfilesystemmirrors CRD to 1.15
Add the cephfilesystemmirrors definition for CI runs where the
Kubernetes version is 1.15 and extension v1 extensions are not
supported.

Closes: https://github.com/rook/rook/issues/7168
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-09 09:50:16 +01:00
Travis Nielsen 043f947321 build: remove yugabytedb operator
The YugabyteDB team has decided to move support of their operator
to a new repo at https://github.com/yugabyte/yugabyte-operator.
The operator in Rook is no longer needed. Further usage of
the YugabyteDB operator is recommended at the new location.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-02-06 00:03:41 -07:00
Madhu Rajanna 81248f1dce ceph: add configmap get RBAC for rbd provisioner
rbd provisioner need to access the configmap
in different namespaces.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-02-03 21:28:00 +05:30
Madhu Rajanna 3cf9f7147e ceph: pass extra-create-metadata to csi-provisioner
when extra-create-metadata is passed to csi-provisioner
it passes few information like namespace name,pvc
name to the cephcsi driver which is required for
rbd encryption.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-02-03 21:27:37 +05:30
Travis Nielsen 81b398f6b6 ceph: add deviceClass to the object store schema
The deviceClass was missing from the object store CRD schema,
disallowing the device class from being specified on
the object store pools.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-02-02 12:13:23 -07:00
Varsha Rao 59084fbe06 ceph: update nfs ganesha pool recommendation
Add following don'ts note for storing ganesha recovery object:
* Don't use fs pool, it can cause this dashboard issue https://tracker.ceph.com/issues/46176
* Don't use erasure coded pool, it will not work due to ganesha's omap requirements

Signed-off-by: Varsha Rao <varao@redhat.com>
2021-02-02 17:04:18 +05:30
Blaine Gardner deec85cd1d Merge pull request #7092 from subhamkrai/route
ceph: create a route for ceph-rgw
2021-01-29 13:14:10 -07:00
subhamkrai beff403c89 ceph: create a route for ceph-rgw
this commit ceph: create a route as
a part of example in `object-openshift.yaml`.
Route is a feature of OpenShift so, changes
are only for object-openshift.yaml.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-01-29 14:09:31 +05:30
Sébastien Han c0123cf182 ceph: add cephfs mirroring support
With Ceph Pacific, Rook can now deploy the cephfs-mirror daemon.
This initial commit covers the deployment of a single daemon only.
Multiple mirror daemons is currently untested.
Only a single mirror daemon is recommended.

The configuration of peers will come in a later PR since the mgr module
is still pending upstream: https://github.com/ceph/ceph/pull/39050

The same goes for integration tests, they will get added later once we
start testing on Pacific.

Closes: https://github.com/rook/rook/issues/7002
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-01-28 19:21:18 +01:00
Travis Nielsen 7472cfd9fa ceph: enable pod disruption budgets by default
The PDBs have been stabilizing for a good length of time now since
they were created in v1.1, and later redesigned in v1.5. The time
has come to enable the feature by default so everyone can enjoy
the stable Rook storage even while draining K8s nodes.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-01-28 10:25:33 -07:00