Commit Graph
797 Commits
Author SHA1 Message Date
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
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
subhamkraiandtravisn 1b2c15041f ceph: update deprecated CRD apiextensions.k8s.io/v1beta1 to v1
the apiextensions.k8s.io/v1beta1 version of CustomResourceDefinition
is deprecated in Kubernetes v1.16 and will no longer be supported from
v1.19. For now, we changing only for ceph and it's related documented.

Signed-off-by: subhamkrai <srai@redhat.com>
Co-authored-by: travisn <tnielsen@redhat.com>
Signed-off-by: subhamkrai <srai@redhat.com>
2020-10-29 06:26:10 +05:30
Ahmad Nurus S 72bf7873c9 nfs: implement disk quota
Signed-off-by: Ahmad Nurus S <prksu.sh@gmail.com>
2020-10-19 10:20:12 +07:00
Alexander Trost 268329709e Merge pull request #6440 from prksu/update-rook-nfs-doc
nfs: update documentation and example
2020-10-18 01:33:28 +02:00
Satoru Takeuchi e22bedbd9b ceph: reduce the number of provisioner pods in small K8s cluster
The default number of provisioner pods are 2. When there is only one node,
for example the CI environment, one of these becomes Pending state.
Although it's harmless, it's better to reduce this value to 1.

Closes: https://github.com/rook/rook/issues/6294

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-10-15 18:25:27 +00:00
Ahmad Nurus S c22189ba74 nfs: update documentation and example
Signed-off-by: Ahmad Nurus S <prksu.sh@gmail.com>
2020-10-16 01:11:44 +07:00
Sébastien Han 4736ddcc87 Merge pull request #6379 from leseb/fix-5591
ceph: add support for stretched cluster crush rule
2020-10-13 17:40:01 +02:00
Sébastien Han 86bcfa744b Merge pull request #6213 from leseb/gh-action-minikube
ci: add integration test for external python script
2020-10-13 16:55:33 +02:00
Sébastien Han b70b098405 ceph: add support for stretched cluster crush rule
The pool spec has now a new property called "replicasPerFailureDomain"
which essentially represents the number of replicas to store in each
failure domain.
Assuming the failure domain is a datacenter (if the cluster is
stretched) then you will have 2 replicas per datacenter where each
replica ends up on a different host. This gives you a total of 4
replicas and for this, the "size" must be set to 4.

Closes: https://github.com/rook/rook/issues/5591
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-10-13 16:33:34 +02:00
Sébastien Han bf9eb38f2a ci: add integration test for external python script
The CI runs a github action that builds and deploys a Rook cluster and
then execute various tests on the create-external-cluster-resources.py
script.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-10-13 16:31:59 +02:00
Travis Nielsen c7e0338d5e ceph: require an odd number of mons and sufficient nodes
The ceph mons should never be started with an even number in quorum.
The desired state should always be an odd number of mons to ensure
a healthy majority quorum. The operator now rejects a request for
an even number of mons.

If there are not a sufficient number of nodes for mons to be on a
unique host, the operator also returns an early error instead of
getting stuck waiting for a pending mon. This is not foolproof since
there might be fewer available nodes for the mons, but at least it
is a quick check for the common case.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-10-12 15:21:27 -06:00
Sébastien Han 010a2804f6 Merge pull request #6392 from aruniiird/add-upgrade-option-to-external-script
ceph: adding '--upgrade' option to external script
2020-10-12 09:55:15 +02:00
Arun Kumar Mohan fbb8af12e1 ceph: adding '--upgrade' option to external script
An '--upgrade' option is added to the option list, which upgrades the user
permissions (caps) to match newer version. Will try to detect
'rgw-pool-prefix' or user can provide it through the argument.

Segregated the command line arguments into three groups, common, output and
upgrade

Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
2020-10-09 18:59:25 +05:30
Travis Nielsen 3eddcf5477 Merge pull request #6283 from sp98/rook-IPv6-support
ceph: support IPv6 single-stack
2020-10-06 07:46:25 -06:00
subhamkrai c2c59ec47b ceph: tune fast device class for OSD on PVC in the Azure
on Azure, all SSDs are reporting as a rotational disk.
This commit will add `tuneFastDeviceClass` flag which will
tune for an SSD even if the cloud provider is reporting
rotational. We have a flag `tuneDeviceClass`
which works vice-versa.

Signed-off-by: subhamkrai <srai@redhat.com>
2020-10-05 20:19:55 +05:30
Santosh Pillai 70c5f70701 ceph: support IPv6 single-stack for ceph
Add --ms-bind-ipv6 true args to mom, osd, mgr, object, mds, rbd daemons.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2020-10-02 01:03:03 +05:30
Travis Nielsen e2cf76a15e Merge pull request #6343 from leseb/fix-6329
ceph: only support one external cluster secret
2020-09-29 08:23:26 -06:00
Sébastien Han 08944c4e50 ceph: only support one external cluster secret
We do not support providing both ROOK_EXTERNAL_USER_SECRET and
ROOK_EXTERNAL_ADMIN_SECRET. When both are provided in the mon secret,
the operator code will use the client.admin user for all its operations.
This will break some of the logic when creating OBC since if
client.admin is detected we assume the cluster is converged and thus
pass args like this:

```
--rgw-realm=external-store --rgw-zonegroup=external-store --rgw-zone=external-store
```

To the radosgw-admin command, which won't work since Rook has no idea
what the external realm/zonegroup/zone are, if any are configured.

This fix should be sufficient for now, but moving forward we should
probably enhance clusterInfo with an "isExternal" property to make
things easier. Also supporting external realm/zonegroup/zone would be
nice. This will probanly hit 1.5 once this code is promoted to stable.
See: https://github.com/rook/rook/issues/6342

Closes: https://github.com/rook/rook/issues/6329
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-09-29 11:06:19 +02:00
Madhu Rajanna 2fa3e71733 ceph: update cephcsi to v3.1.1
as cephcsi v3.1.1 is released today
with many bug fixes and enhancements,
more details can be found at
https://github.com/ceph/ceph-csi/releases/tag/v3.1.1

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-09-29 14:03:44 +05:30
Mudit Agarwal c547b36aa0 ceph: update csi sidecar images
This PR makes the changes in csi templates and
upgrade documentation required for updating
csi sidecar images.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2020-09-28 18:58:52 +05:30
Tim Hughes 406d3f44f8 docs: remove compression from test yamls
Signed-off-by: Tim Hughes <thughes@thegoldfish.org>
2020-09-24 22:46:43 +01:00
Tim Hughes 363baeb19b docs: changes example yamls to use parameters.compression_mode
Makes compression_mode in example yamls consistent

Closes: https://github.com/rook/rook/issues/6318
Signed-off-by: Tim Hughes <thughes@thegoldfish.org>
2020-09-24 18:59:15 +01:00
Travis Nielsen 02fa0eb921 Merge pull request #6228 from Madhu-1/fix-ownerref
ceph: remove owner reference set by rook on csidriver
2020-09-18 10:09:36 -06:00
Varsha Rao 9a4403b55e ceph: update about 'rook' module in cluster.yaml
'rook' module is not enabled by default. So update the wrong comment about it.

Signed-off-by: Varsha Rao <varao@redhat.com>
2020-09-18 20:10:55 +05:30
Sébastien Han 451622a955 ceph: add rbd-mirror configuration
Rook is now capable of configuring mirroring between sites. The
implementation works at different levels:

* CephBlockPool: which introduces a new `mirroring` configuration as well
as `statusCheck`. When turned on, Rook will enable mirroring on the
pool. It will also create a bootstrap peer token and store it in a
Kubernetes Secret. The name of that Secret can be found in the Status
field of the CephBlockPool CRD. This token can be fetched and used by
other clusters to configure the site as a peer. Mirroring can be
configured either at the pool or the image level.

* CephRBDMirror: which introduces a new `peers` configuration allowing
Rook to connect to peers by passing a Secret name. The administrator will
create a Kubernetes Secret with 2 keys: 'token' for the bootstrap peer
token and 'pool' for the name of pool. Once detected the rbd-mirror
controller will go ahead and import the peer configuration.

Pool mirroring status example:

```
status:
  info:
    rbdMirrorBootstrapPeerSecretName: pool-peer-token-test
  mirroringInfo:
    lastChanged: "2020-09-17T14:47:27Z"
    lastChecked: "2020-09-17T14:48:27Z"
    summary:
      summary:
        mode: image
        peers:
        - client_name: client.rbd-mirror-peer
          direction: rx-tx
          mirror_uuid: ""
          site_name: rhcs
          uuid: c50522a4-28a4-4bd3-ba68-e11780308882
        site_name: 91eae0dd-06b1-4d2c-91f3-1311c9df382b-rook-ceph
  mirroringStatus:
    lastChecked: "2020-09-17T14:48:27Z"
    summary:
      summary:
        daemon_health: OK
        health: OK
        image_health: OK
        states:
          replaying: 1
```

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-09-17 19:05:04 +02:00
Madhu Rajanna a1024ebc75 ceph: remove owner reference set by rook on csidriver
currently, we are setting the rook operator as owner
on the csidriver objects,  as csidriver is cluster
scoped object we should not set namespaced object as
owner on cluster scoped object

fixes #6162

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-09-15 11:39:27 +05:30