Commit Graph
5838 Commits
Author SHA1 Message Date
Travis Nielsen 3fb167685e Merge pull request #6550 from subhamkrai/fs-crd
ceph: some fields in FS CRD are missing
2020-11-05 09:11:29 -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
Sébastien Han 4c3981bdba Merge pull request #6551 from aruniiird/some-cosmetic-fixes
ceph: some minor changes to external python script
2020-11-05 13:52:56 +01:00
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
Travis Nielsen f4fc56aa47 Merge pull request #6504 from leseb/external-script-only-support-default-prom-port
ceph: fail if mgr prometheus is not default
2020-11-04 08:17:08 -07: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
Sébastien Han d4c486bf0f Merge pull request #6535 from leseb/kms-tls-server-support
ceph: add support for VAULT_TLS_SERVER_NAME
2020-11-04 09:57:14 +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
Travis Nielsen 5814e43364 Merge pull request #6533 from travisn/remove-osd-pvc-from-job
ceph: Remove the osd pvc when purging the osd
2020-11-03 10:29:21 -07:00
Travis Nielsen c356fcd2aa Merge pull request #6537 from travisn/test-nautilus-14-2-12
ceph: Tests need to use v14.2.12 due to broken osds in v14.2.13
2020-11-03 10:28:24 -07:00
Travis Nielsen d674dcd88c ceph: tests use v14.2.12 due to broken osds in v14.2.13
The ceph v14.2.13 release has breaking changes for the ceph-volume batch
scenario that is preventing non-pvc OSDs from being created. In the short
term we will pin the tests to v14.2.12 and separately we will need to
address the changes needed and/or wait for a fix from ceph.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-11-03 09:30:07 -07:00
Travis Nielsen 37a56f39a6 ceph: remove the osd pvc when purging the osd
The osd purge job was not removing the osd prepare job or the
osd pvc due to an invalid label query for the pvc. Now the
prepare job and pvc will be removed as expected from the job.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-11-03 08:32:37 -07:00
Sébastien Han bf7203ab65 Merge pull request #6473 from aruniiird/monitoring_endpoint_checks
ceph: added additional checks on accepting monitoring endpoint
2020-11-03 15:58:33 +01:00
Sébastien Han b477d9c33d ceph: add support for VAULT_TLS_SERVER_NAME
We now support VAULT_TLS_SERVER_NAME which represents the name to use as
the SNI host when connecting via TLS.
This is typically needed when a single host has multiple certificates,
same as virtual hosts but for SSL certificates.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-11-03 14:59:15 +01:00
Arun Kumar Mohan 20e7c4fbb9 ceph: changes to run unittests for external script
Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
2020-11-03 19:24:10 +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
Sébastien Han 341e2d7116 Merge pull request #6529 from leseb/rework-tests
ceph: rework unit test
2020-11-02 15:01:04 +01:00
Sébastien Han b7e0e206d3 ceph: rework unit test
Golang maps order is not always guaranteed to be identical, which makes
the table driven test to fail. Because of the nature of the maps, it is
hard to predict the exact position of an element in the map. This
makes the table driven test flappy.
Reworked the unit test using a contains statement which achieves the
same validation.

Closes: https://github.com/rook/rook/issues/6522
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-11-02 12:14:09 +01: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 a60351a8c5 Merge pull request #6474 from leseb/osd-encryption-vault
ceph: add vault kms support for osd encryption
2020-10-30 17:11:40 +01: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 032e6b5d77 ceph: remove osd pvc when the cluster is gone
Just like we do for the monitors, we set an ownerref to the OSD PVC so
when the cluster is deleted we remove the PVC too.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-10-30 16:17:15 +01:00
Sébastien Han 3403776c3e ci: add more osd on pvc scenario
Add the following scenario:

* simple osd on pvc
* osd on pvc with db device
* osd on pvc with wal device
* encrypted simple osd on pvc
* encrypted osd on pvc with db device
* encrypted osd on pvc with wal device

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-10-30 16:17:10 +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 024d1a81a6 Merge pull request #6515 from yuseinishiyama/label-mon-pods
ceph: Label mon pods
2020-10-30 08:22:05 -06:00
Yusei Nishiyama beaddb9c22 ceph: propagte labels to mon pods
To align it with how the other components are implemented in #6084

Signed-off-by: Yusei Nishiyama <yusei.nishiyama@soundcloud.com>
2020-10-30 13:43:18 +01:00
Yusei Nishiyama 2967bceca8 test: improve TestLabelsApply
To clarify the spec of ApplyToObjectMeta This also fixes the misleading
comments on the method.

Signed-off-by: Yusei Nishiyama <yusei.nishiyama@soundcloud.com>
2020-10-30 13:40:42 +01:00
Travis Nielsen 1c562512e1 Merge pull request #6501 from xiaods/issue-6480-fix
Remove provisioner from nfs docs
2020-10-29 10:24:58 -06: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
Deshi Xiao 512544b849 docs: tuning docs for nfs setup
1. remove missing provisioner.yaml
2. modified statement description

Signed-off-by: Deshi Xiao <xiaods@gmail.com>
2020-10-29 21:22:09 +08:00
Sébastien Han 9dd53cce9d Merge pull request #6494 from LalitMaganti/master
ceph: ignore MDS_ALL_DOWN during reconciliation
2020-10-29 11:30:09 +01:00
Sébastien Han 2e3e4c4916 Merge pull request #6424 from subhamkrai/apiextensions.k8s.io-v1
ceph: update deprecated CRD apiextensions.k8s.io/v1beta1 to v1
2020-10-29 09:31:33 +01: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
Lalit Maganti 88f16e4980 ceph: ignore MDS_ALL_DOWN during reconciliation
This allows the catch-22 situation where the filesystem cannot be
reconciled because there is no MDS but there is no MDS because the
operator has not reconciled the filesystem and brought up the MDS pods.

Closes #5967, #5846

Signed-off-by: Lalit Maganti <lalitm@google.com>
2020-10-29 01:11:36 +00: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
Travis Nielsen 0134a3c453 Merge pull request #6503 from leseb/do-not-assume-error-type
ceph: assert error type before using it
2020-10-28 13:21:37 -06:00
Travis Nielsen 1462c462c8 Merge pull request #6510 from subhamkrai/remove-allnodes
ceph: remove allNode option for rgw
2020-10-28 12:03:03 -06:00
subhamkrai cfdc5e7c50 ceph: remove allNode option for rgw
this commit removes unnecessary allNodes option
from rgw.

Signed-off-by: subhamkrai <srai@redhat.com>
2020-10-28 22:38:11 +05:30
Sébastien Han 1168dbc6ca ceph: assert error type before using it
We don't always get an error of the type "*exec.ExitError" so we must
validate the type before printing it otherwise the interface conversion
will fail.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-10-28 17:08:38 +01:00