Commit Graph
822 Commits
Author SHA1 Message Date
Renan Campos ad9dcb0c05 ceph: periodically prune crash entries older than user-provided days
Rook's crashcollector pod posts entries to the ceph cluster when a crash occurs.
Over time the number cluster may hold crash entries needlessly.
To clean up old crash entries, this PR adds a field to the ceph cluster CR for the user to specify the number of days a crash entry should be kept for.
Providing a value for the field keepXDays creates a cronjob that runs every day at midnight, calling "ceph crash prune <keepXDays>".

Closes: https://github.com/rook/rook/issues/6332
Signed-off-by: Renan Campos <rcampos@redhat.com>
2020-11-24 17:06:18 -05:00
Madhu Rajanna ca3e23853e ceph: update cephcsi to latest release
updating cephcsi to v3.1.2 which is a latest
bugfix release.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-11-19 12:20:11 +05:30
Travis Nielsen 54560250e9 Merge pull request #6497 from sp98/osd-pdb-reconciler
ceph: OSD PDB reconciler changes
2020-11-18 17:30:24 -07:00
Santosh Pillai 8602b9c116 ceph: osd pdb reconciler changes
-creates a single PDB (max-unavailable=1) for all OSDs.  This PDB allows one OSD to go down at a given time.
-When a drain is detected, blocking PDBs (max-unavailable=0) will be created for each failure domain that is not being drained and the main PDB (max-unavilable=1) will be deleted. This will allow all the OSDs in the currently drained failure domain to be removed while blocking the deletion  of OSDs in other failure domains.
-Once the PGs are healthy again, the blocking PDBs will be deleted and the main PDB will be restored.
-Add PG healthcheck timeout
-Delete any legacy node drain pods and blocking OSD PDBs

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2020-11-18 18:25:07 +05:30
Sébastien Han afc7ecff31 ceph: add snapshot scheduling for mirrored pools
Now, we can schedule snapshots on pools from the CephBlockPool CR when
the pool is mirrored.
It can be enabled like this:

```
mirroring:
  enabled: true
  mode: pool
  snapshotSchedules:
    - interval: 24h # daily snapshots
      startTime: 14:00:00-05:00
```

Multiple schedules are supported since snapshotSchedules is a list.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-11-18 09:50:09 +01:00
rohan47 5b5059ec2f ceph: support NAD from diffrent namespaces
Added the support of NAD from diffrent namespaces.
they can be referrenced as <namespace>/<name-of-nad> e.g.,
default/public-nw.
Updated the multus doc to explain the same.

Signed-off-by: rohan47 <rohgupta@redhat.com>
2020-11-17 20:34:58 +05:30
Travis Nielsen eb2e022530 ceph: create custom resources separately from crds
The CRs must be created in a separate kubectl create command
from the creation of the CRDs, otherwise the create command
will fail.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-11-12 15:19:01 -07:00
Travis Nielsen 10b8e3dcf8 Merge pull request #6627 from BlaineEXE/upgrade-manifests
docs: update ceph upgrade to use common.yaml
2020-11-12 14:29:32 -07:00
Blaine Gardner e9cd35f2b8 docs: update ceph upgrade to use common.yaml
Use common.yaml to apply changes to resources instead of keeping an
upgrade-*-apply.yaml file. Update the upgrade docs to reflect this also.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2020-11-12 14:20:52 -07:00
Travis Nielsen 247fc0d2dd Merge pull request #6598 from cloudical-io/discovery_pod_labels
ceph: allow custom labels to be added to the discover daemonset
2020-11-12 14:15:00 -07:00
Blaine Gardner 2a37a403ce docs: revise Ceph upgrade docs for v1.5 release
Update docs and manifests as needed for v1.5 release.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2020-11-12 12:09:59 -07:00
Alexander Trost fa62f4ac5d ceph: allow custom labels to be added to the discover daemonset
Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2020-11-12 16:20:01 +01:00
Alexander Trost 34930020ab ceph: allow pod labels to be added to CSI components
This adds the functionality to add custom pod labels to the CSI
components through the operator configuration way of env vars or config
map.

Resolves #6593

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2020-11-12 13:06:24 +01:00
Travis Nielsen bf1d3888f4 ceph: factor out CRDs from the common.yaml and helm chart
The CRDs need to be installed and updated separately from the
rest of the manifests. Helm charts also do not have a way to update
CRDs, therefore, any updates to the CRD schema must be done separately
from the helm chart. Now the CRDs are created in a new crd.yaml that must
be created along with common.yaml and before creating the operator.

The helm chart still contains the CRDs for initial creation, though
the helm chart will never update or remove them.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-11-11 12:16:20 -07:00
Travis Nielsen 61539b6699 Merge pull request #6559 from BlaineEXE/upgrade-test-1.5
ceph: upgrade test Rook only from v1.4 to master
2020-11-11 10:13:39 -07:00
Travis Nielsen 6142efe14b Merge pull request #6579 from subhamkrai/nfs-log
ceph: change nfs-ganesha log level
2020-11-11 10:09:52 -07:00
subhamkrai 7d1b5f7416 ceph: change nfs-ganesha log level
this commit allows changing the default
log level from nfs.yaml file by adding
new command.

Signed-off-by: subhamkrai <srai@redhat.com>
2020-11-11 20:34:07 +05:30
Travis Nielsen 55770d4fc8 Merge pull request #6594 from cybozu-go/doc-ceph-clarify-when-operator-stop-orchestration
docs: clarify the meaning of cleanup policy of ceph cluster crd
2020-11-11 07:52:46 -07:00
Satoru Takeuchi 21cef906f7 docs: clarify the meaning of cleanup policy of ceph cluster crd
The description of cleanupPolicy is a bit ambiguous. First, we should clarify
that both skipping orchestration and data cleanup will happen iff
"yes-really-destroy-data" is set to `confirmation`. Second, We should also
describe wiping devices will happen even if user don't specify `sanitizeDisks`
explicitly.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-11-11 05:15:41 +00:00
Blaine Gardner 2f034824cb ceph: upgrade test Rook only from v1.4 to master
Since Rook no longer supports legacy filestore devices, there is
no need to keep testing upgrades from v1.2 all the way to master.
We can now just test v1.4 to master.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2020-11-10 15:44:05 -07:00
Travis Nielsen b9f692a56e ceph: disable the discovery daemon by default
The discovery daemon is not needed in most scenarios, therefore we disable it
by default. More and more clusters are moving to the cluster-on-pvc scenario
which certainly does not need the local discovery. Even where clusters are not
running on PVCs, the discovery is not needed since the device discovery is again
performed in the osd prepare job.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-11-10 13:16:52 -07:00
Satoru Takeuchi c7990777d2 ceph: make the placement of admission controller configurable
If users want to restrict the nodes where Ceph daemons should exist,
it's better to make the placement of admission controller configurable
as other daemons.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-11-09 11:54:52 +00:00
Travis Nielsen c029b1513d ceph: remove nullable attribute from pre-1.16 schema
The nullable attribute was causing the integration tests to fail
on 1.13 and earlier where it is not supported in the schema.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit cc8f406ce9)
2020-11-06 10:47:26 -07:00
Sébastien Han e3d032dbc1 Merge pull request #6489 from travisn/stretch-mons
ceph: Stretch cluster configuration
2020-11-06 15:16:39 +01:00
Travis Nielsen 67ce7e4c3b Merge pull request #6561 from Madhu-1/cephfs-priv-pod
ceph: add privileged securityContext to cephfs deployment
2020-11-06 07:13:33 -07:00
Mateusz Gozdek 8ba3762fa4 docs: fix bunch of typos
Found by running the following command:

codespell -S .git,*.png,*.jpg -L \
aks,keyserver,atleast,dne,ser,ist,files\',ba,dum,iam,te -f -H

Signed-off-by: Mateusz Gozdek <mgozdekof@gmail.com>
2020-11-06 10:01:04 +01:00
Madhu Rajanna 8f5196a559 ceph: add privileged securityContext to cephfs deployment
cephfs csi driver still uses the ceph CLI for all the
ceph fs operations, when cephcsi gets a request from
the kubernetes it will internally starts threads for
each call. in cephcsi we are setting the pids
limit to max, to set this value the container has
to be running as the privileged one.

if we go with default pid limit we will face core dump
due to resource crunch.

without privileged access we will see Failed to set new
PID limit to -1: open /sys/fs/cgroup/pids/kubepods.slice/
kubepods-besteffort.slice/kubepods-besteffort-pod1029ed37_bebc_466d_9e53_79e7323a67ed.slice/crio-9ef6768d027916f414bf30b54ef13eebad8efd0aa4741d97618affa838d7b4c0.scope/pids.max: permission denied

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-11-06 09:40:18 +05:30
Travis Nielsen a5b9fbc994 ceph: update base image and examples to v15.2.5
For the v1.5 release we use the latest version of ceph by default,
which is now v15.2.5

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-11-05 15:50:23 -07:00
Travis Nielsen b91f4211c9 ceph: configure a stretched cluster
In clusters where only two datacenters (or similar failure domains)
are available, a different mon and osd approach is needed to deal
with the network partitions or some other reason for one of the failure
domains going down. The Ceph stretched cluster makes the mons aware
of the failure domains by configuring one as the arbiter in a third
zone, while keeping two replicas of the data in each of the data
zoens.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-11-05 09:17:52 -07:00
subhamkrai b80d83fcfa ceph: some fields in FS CRD are missing
this commit add the missing `deviceClass` field
in filesystem CRD with replication of pool spec.

Signed-off-by: subhamkrai <srai@redhat.com>
2020-11-05 20:14:11 +05:30
Arun Kumar Mohan 0c9bd0fbae ceph: some minor changes
Some cosmetic changes and an extra negative test

Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
2020-11-05 15:55:59 +05:30
Sébastien Han 8a83d93d93 Merge pull request #6546 from leseb/exporter-script-lint
ceph: lint exporter script file
2020-11-05 09:41:07 +01:00
Travis Nielsen bea2a7bcc5 Merge pull request #6526 from Madhu-1/csi-rbac
ceph: update required rbac for csi
2020-11-04 15:17:09 -07:00
Sébastien Han d5bd79d5a2 Merge pull request #6534 from subhamkrai/ci-v1beta1
ceph: helm test for k8s 1.15 failing
2020-11-04 17:37:06 +01:00
Sébastien Han 671c5f2f25 ceph: lint exporter script file
Listening to what my linter says...

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-11-04 16:49:28 +01:00
subhamkrai 4f9b8a2561 ceph: helm test for k8s 1.15 failing
helm test for k8s 1.15 failing showing errors
CRDs not found, after some latest changes to CRDS.

Signed-off-by: subhamkrai <srai@redhat.com>
2020-11-04 20:01:37 +05:30
Sébastien Han 1ed307cb09 ceph: fail if mgr prometheus is not default
Currently, Rook does not support a prometheus exporter port different
than 9283 so let's fail and force the user to set it to the default.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-11-04 10:52:58 +01:00
Madhu Rajanna 5de2ded83c ceph: update required rbac for csi
as we are approaching the rook 1.5 release, we
are making a required RBAC changes for cephcsi ahead
of cephcsi release to provide smooth upgrade experience
for the users without any RBAC changes in rook minor release.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-11-04 12:32:08 +05:30
Arun Kumar Mohan b0b8c8222b ceph: fixed monitoring port issue
Fixed an issue where monitoring port, even when set by user, being
overridden by the default value.

Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
2020-11-03 08:55:13 +05:30
Arun Kumar Mohan bb753caf52 ceph: need to shift 'DummyRados' class to top
As 'DummyRados' object is being used in other parts of the code, had to
shift this to top.

Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
2020-11-03 08:55:13 +05:30
Arun Kumar Mohan 72a8a6071b ceph: new tests for monitoring endpoints and upgrade user changes added
Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
2020-11-03 08:55:13 +05:30
Arun Kumar Mohan 7b8da65c81 ceph: fixed existing test cases
Modified / Fixed all the existing tests according to the latest changes.

Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
2020-11-03 08:55:13 +05:30
Arun Kumar Mohan c1a4ef6455 ceph: added additional checks on accepting monitoring endpoint
Changes related to Monitoring endpoint
a. for any monitoring endpoint and port (either user given through arguments
or internally found), added code to make sure we convert the endpoint
host_name to a proper IP address.
b. checks added to make sure we have a valid and reachable endpoint

Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
2020-11-03 08:55:13 +05:30
Jared Watts 8d445c919d Merge pull request #6202 from prksu/nfs-quota
nfs: implement disk quota
2020-11-02 08:34:54 -08:00
Travis Nielsen 44bf443dca Merge pull request #6495 from LalitMaganti/preserve-fs
ceph: add option to preserve filesystem on CRD deletion
2020-10-30 16:56:38 -06:00
Lalit Maganti c6aec79c4f ceph: add option to preserve filesystem on CRD deletion
Due to #6492, preservePoolsOnDelete is not useful at all for CephFS;
after the filesystem is deleted, the leftover pools cannot be
reassocaited with a newly created filesystem without wiping all
metadata. The only way we can actually preserve data is keeping around
the entire filesystem.

This commit implements a `preserveFilesystemOnDelete` option which work
similar to the existing pool preservation option but instead keeps the
whole CephFS while taking it down and removing all MDSes.

This commit also changes all documentation to refer to this new option
with the intent of essentially deprecating `preservePoolsOnDelete`. IMO,
keeping around `preservePoolsOnDelete` is actively harmful because it
lulls users into thinking their data will be safe but, in reality,
recovering from this situation is highly complex and has large potential
for data loss.

Signed-off-by: Lalit Maganti <lalitm@google.com>
2020-10-30 17:04:18 +00:00
Sébastien Han 34079a558d ceph: add missing block crd field
Resync the crd schema for upgrades.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-10-30 16:17:15 +01:00
Sébastien Han ea1d71cbfb ceph: add vault kms support for osd encryption
When the Ceph cluster runs on PVC and the OSDs are encrypted we can
store LUKS's Key Encryption Key inside a Key Management System. Today,
Rook only supports HashiCorp Vault: https://www.vaultproject.io/

The CephCluster has now a new "security" field which will plug onto the
KMS. Here is an example:

security:
  kms:
    tokenSecretName: <name of the secret containing a Vault token, used
    to authenticate>
    connectionDetails: < a map of strings containing connection
    information>

Refer to the ceph-cluster-crd documentation to lear more.

Closes: https://github.com/rook/rook/issues/6105
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-10-30 16:16:33 +01:00
Travis Nielsen 22a1630249 Merge pull request #5483 from cloudandheat/feature/configurable-crush-root
ceph: make root= CRUSH label value configurable
2020-10-29 10:21:02 -06:00
Jonas Schäfer 7ace6ac255 ceph: make root= CRUSH label value configurable
The CRUSH map does not allow duplicate values (nor keys) for the
labels. That means that if the currently hardcoded label value
`default` occurs anywhere else in the tree (for example, because
some of the topology labels provided by the cloud provider use it),
the cluster cannot sucessfully spawn.

By giving the user control over the label value used for the root
CRUSH map label, it is possible to adapt the cluster to this
situation.

To be able to actually use the `default` value, the root=default
node which is created by default by ceph itself has to be removed;
since that node is accompanied by a replicated crush rule, we have
to remove that rule, too.

The integration tests are modified to sometimes use the custom
crushRoot (based on an arbitrary criterium) to get coverage across
the various suites. Separate tests could be added, but were not
deemed necessary at this point.

Fixes #4993.

Signed-off-by: Jonas Schäfer <jonas.schaefer@cloudandheat.com>
2020-10-29 09:22:41 +01:00