Commit Graph
7961 Commits
Author SHA1 Message Date
Juan Miguel Olmo Martínez 7b3e2b006e ceph: Do not log sensitive information in debug mode
Fix security issues identified by TrailOfBits:
Logging of sensitive information in debug mode

Problematic debug lines which can contain sensitive data have been removed

Resolves: #4568

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
2020-01-03 17:16:25 +01:00
Sébastien Han 9728c24848 Merge pull request #4605 from leseb/help-pr-commits
documentation: improve commit structure
2020-01-03 15:03:50 +01:00
Sébastien Han 360ff98923 documentation: improve commit structure
This commits adds more documentation on how to contribute better commit
messages.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-03 10:14:41 +01:00
Dmitry Yusupov d90d2411bc Merge pull request #4600 from nizamial09/fix_logic_finalizer_1
edgeFs: Fix logic of error handling in the finalizer method
2020-01-02 05:11:31 -08:00
Nizamudeen e92e7e1bb1 edgeFs: Fix logic of error handling in the finalizer method
If obj is not successfully cast into an e dgefsv1.Cluster, ok will be false, resulting in the .Update(cluster) operation not running, and the declared err variable retaining its default nil value. Subsequently, a check against err is performed, which will evaluate to false, resulting in logging the finalizer as removed when it in fact was not.

Signed-off-by: Nizamudeen <nia@redhat.com>
2020-01-01 15:08:14 +05:30
Travis Nielsen 97ce25ce03 Merge pull request #4589 from leseb/fix-activate-env
ceph: osd add missing ROOK_CEPH_MON_HOST env
2019-12-26 10:46:09 -07:00
Sébastien Han 4224f84d7c ceph: osd add missing ROOK_CEPH_MON_HOST env
The ROOK_CEPH_MON_HOST env var was missing from the pod env so the
CEPH_ARGS won't be populated correctly.

Closes: https://github.com/rook/rook/issues/4558
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-12-23 16:15:46 +01:00
Sébastien Han bc555b1bbc Merge pull request #4583 from leseb/fix-encrypted-osd
ceph: add missing vol mount for encrypted osds
2019-12-23 15:17:18 +01:00
Juan Miguel Olmo Martínez 5f1c95002b ceph: Avoid invalid execution state
security issues identified by TrailOfBits:

Improperly handled type assertion error could result in invalid
execution state.
If we obtain an error trying to get a Node object is better not
continue executing this function.

Resolves #4567

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
2019-12-23 11:44:18 +01:00
Sébastien Han 7d11524643 ceph: add missing vol mount for encrypted osds
"ceph-volume activate" on encrypted osds needs a ceph.conf as well as
connectivity to the mons. This commit adds that to that "activate-osd"
init container.

Closes: https://github.com/rook/rook/issues/4558
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-12-23 09:59:04 +01:00
Travis Nielsen eeb2d35a13 Merge pull request #4561 from billimek/bump-operator-mem-limit
ceph: Bump operator mem limit
2019-12-20 10:41:11 -07:00
Jeff Billimek 127e9d289a ceph: bumping ceph-operator memory limit to 256Mi
* bumping ceph-operator memory limit from 128Mi to 256Mi in order to
avoid OOMkills of the rook-ceph-operator pod
* updating documentation example for operator to denote a limit of 256Mi
instead of 128Mi

When upgrading from rook v1.1.7 to v1.2.0, the rook-ceph-operator pod
continued to get OOMKilled by the kubernetes scheduler.  Manually
bumping this limit to something higher than 128Mi (I tried 256Mi and it
was good) prevented the OOMKills.

Signed-off-by: Jeff Billimek <jeff@billimek.com>
2019-12-20 11:41:40 -05:00
Sébastien Han 805e606cce Merge pull request #4508 from bsperduto/hotfix/objectBucketClaimPort
ceph: fix object bucket provisioner when rgw not on port 80
2019-12-20 10:37:23 +01:00
Travis Nielsen 47ddb504d4 Merge pull request #4509 from mateuszlos/clientCRD_tests
ceph: client CRD test fixes
2019-12-19 12:33:31 -07:00
Travis Nielsen c1bd451af0 Merge pull request #4544 from travisn/osd-on-pvc-crush
Rehydrate the osd CRUSH location for PVCs
2019-12-18 15:48:52 -07:00
Travis Nielsen dfabccc2ee ceph: rehydrate the osd CRUSH location for PVCs
The OSDs on PVCs were changing location in the CRUSH
hierarchy after an operator restart due to the location
property not being re-discovered on the OSD daemon.
Since OSDs on PVCs do not run the prepare pod again
to discover this property, the operator must read it
off the existing osd deployment. The operator was
reading other properties, but now will read the location
as well.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-12-18 15:10:24 -07:00
Dmitry Yusupov fce90f8f6a Merge pull request #4540 from dyusupov/master
EdgeFS: last minute doc changes for 1.2
2019-12-18 11:22:08 -08:00
Dmitry Yusupov 6ebcc52565 EdgeFS: last minute doc changes for 1.2
Signed-off-by: Dmitry Yusupov <dmitry@nexenta.com>
2019-12-18 11:19:39 -08:00
Travis Nielsen af52e691c7 Merge pull request #4537 from travisn/upgrade-headers
Increase size of headers in the Ceph upgrade doc
2019-12-18 12:12:36 -07:00
Travis Nielsen 36894b1791 ceph: increase size of headers for upgrade
To simplify the readability of the important sections for the upgrade
we will increase the header size.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-12-18 12:00:51 -07:00
Blaine Gardner 56569ffc23 Merge pull request #4532 from SUSE/rename-disaster-recovery-md
docs: append `ceph-` to `disaster-recovery.md` doc
2019-12-18 11:37:47 -07:00
Alexander Trost c80bf67bbb Merge pull request #4533 from galexrt/docs_advanced_toc
docs: added toc to Ceph advanced configuration page
2019-12-18 19:31:53 +01:00
Blaine Gardner 326b2b6a32 docs: append ceph- to disaster-recovery.md doc
Add the `ceph-` prefix to the `disaster-recovery.md` document since it
is Ceph-specific and should be logically grouped with the rest of the
`ceph-` docs.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-12-18 11:31:49 -07:00
Alexander Trost 78cce642a4 docs: added toc to Ceph advanced configuration page
Added table of contents to the Ceph advanced configuration page to make
it easier to find the right section till the theme / layout of the
homepage can autogenerate a toc if enabled.

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2019-12-18 19:25:20 +01:00
Travis Nielsen f7b6984b6e Merge pull request #4420 from galexrt/fix_cephfs_docs
docs: fix storageclass name used
2019-12-17 15:22:22 -07:00
Sébastien Han 8f00654ade Merge pull request #4518 from travisn/is-upgrade
Only perform upgrade checks when the image changes
2019-12-17 23:12:14 +01:00
Travis Nielsen f48e0948ee Merge pull request #4355 from ashishranjan738/status
enhance(ceph): Adds status field for ceph related CRs
2019-12-17 11:57:20 -07:00
Blaine Gardner 0ca98c6989 Merge pull request #4512 from sp98/fix-pg-autoscaler
ceph: add retry while enabling mgr modules
2019-12-17 11:56:01 -07:00
Travis Nielsen b79c223986 ceph: only set isUpgrade when the image changes
The isUpgrade flag was being set every time the operator
was started. This caused the upgrade checks to be run every
time the operator restarted. Thus, if any mons were down,
you likely would get stuck on the upgrade checks since another
mon could not be stopped. We need to rely on the upgrade being
detected either by a different image name from the cluster CR
update, or from different versions of the daemons running
in case the operator was restarted in the middle of an upgrade.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-12-17 10:57:26 -07:00
Santosh Pillai 4081a74448 ceph: add retry while enabling mgr modules
Enabling pg_autoscalar module fails most probably becasue `ceph mgr module enable <>` is happening very quickly after ceph mgr starts.
This PR adds a retry (5 times) with a sleep interval of 5 seconds (for each interval) to handle failure while enabling mgr modules.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2019-12-17 14:41:00 +05:30
Sébastien Han 29e5fae591 Merge pull request #4496 from Madhu-1/upgrade-fuse
CSI: cephfs and rbd daemonset upgrade strategy
2019-12-17 09:50:26 +01:00
Ashish Ranjan 8274aa2426 enhance(ceph): Adds status field for ceph related CRs
This commit adds status field for ceph related CRs which will be useful for knowing the ceph component status without checking the logs.

Signed-off-by: Ashish Ranjan <ashishranjan738@gmail.com>
2019-12-17 12:01:17 +05:30
Travis Nielsen 92e7f12451 cephcsi: add upgrade documentation for csi driver
If using ceph-fuse or rbd-nbd the application pods will need
to be restarted during upgrade. This adds a description of
the steps necessary to ensure the applications remain healthy
during upgrade.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-12-16 23:16:05 -07:00
Madhu Rajanna 8be3cdd10e CSI: cephfs and rbd daemonset upgrade strategy
CSI nodeplugins, specifically when using cephfs FUSE or
rbd-nbd as the mounters, when upgraded, will
cause existing mounts to become stale/not-rechable
(usually connection timeout errors).

This is due to losing the mount processes running within the
CSI nodeplugin pods.

This PR add updated the Daemonset update strategy
based on the ENV variable to take care of above issue
with some manual steps

Moreinfo: https://github.com/ceph/ceph-csi/issues/703

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

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-12-16 23:15:56 -07:00
Travis Nielsen dca9672992 Merge pull request #4343 from jmolmo/issue_4342
Ceph: Toleration for <NotReady> nodes set to 5 seconds
2019-12-16 23:15:38 -07:00
Juan Miguel Olmo Martínez e8ccef854d Ceph: Toleration seconds for <NotReady> nodes is now configurable
Reduce from 5 minutes to less than 50 seconds the time needed to restart a
mgr and osds(PVCs based),rgw,mds,rbd,nfs and toolbox pod that was running
in a k8s "NotReady" Node.

A new Rook Operator setting has been added to allow the user to set the
time used in pod's toleration <node.kubernetes.io/unreachable>:
ROOK_UNREACHABLE_NODE_TOLERATION_SECONDS = <5>

New setting added in release notes

Addressed @travisn,@leseb, and @blaineEXE suggestions

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
2019-12-16 21:38:46 -07:00
Brian Sperduto 78f72d48d6 ceph: fix object bucket provisioner when rgw not on port 80
Solves issue where provisioner would not handle other ports

Signed-off-by: Brian Sperduto <brian.sperduto@gmail.com>
2019-12-16 19:29:21 -06:00
Travis Nielsen cfa34d2973 Merge pull request #4511 from leseb/error-withmessage
ceph: do not print extended format for loggers
2019-12-16 16:51:46 -07:00
Mateusz Los cd713b11cb ceph: client CRD test fixes
wait for client to be updated before verifying caps

Signed-off-by: Mateusz Los <los.mateusz@gmail.com>
2019-12-16 23:06:33 +01:00
Dmitry Yusupov 500f8851a8 Merge pull request #4514 from sabbot/prevent-configuration-deletion
EdgeFS: prevent configuration removal
2019-12-16 13:48:51 -08:00
Travis Nielsen 577ebc6ee7 Merge pull request #4390 from Madhu-1/cephfs-kernel-flag
CSI: Add ENV variable to use ceph kernel client
2019-12-16 14:28:37 -07:00
Anton Skriptsov 9d959d0811 edgefs: prevent configuration removal
Fix #4510

Signed-off-by: Anton Skriptsov <sabbotagge@gmail.com>
2019-12-16 12:12:19 -08:00
Travis Nielsen 804e41132d ceph: force enable the cephfs kernel driver by default
There are two issues at odds with the cephfs driver. The
first is that older kernels less than 4.17 do not support
quotas so PVC sizes will not be enforced with the kernel
driver in that case. If the FUSE client is used instead, there
are issues during upgrade because the client mount will be
disrupted and the client pods will have to restart.

To prevent client pods from breaking during upgrade, we enable
the kernel driver by default. If the quotas are critical,
the admin will need to take steps during upgrade to prevent
breaking the applications.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-12-16 13:04:16 -07:00
Madhu Rajanna 85d622dc2f CSI: Add ENV variable to use ceph kernel client
In ceph-csi v1.2.2 we have add a flag `forcecephkernelclient`
to force use Ceph Kernel clients on kernel < 4.17 which
support quotas for Cephfs

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-12-16 12:36:31 -07:00
Blaine Gardner 02afa746bf Merge pull request #4491 from travisn/upgrade-testing
Clarifications to v1.2 upgrade guide
2019-12-16 11:37:37 -07:00
Travis Nielsen 32a69b8afc ceph: clarifications to v1.2 upgrade guide
Removed some obsolete instructions from the 1.1 upgrade
and made a few minor fixes to make the upgrade to 1.2 smoother.
With the addition of the CephClient CRD, the CRD needs to be
created before the upgrade or else the operator log will be
filled with errors until it is created. The CSI driver also
had an error when registering after the upgrade due to an RBAC
change.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-12-16 11:31:52 -07:00
Sébastien Han ad95c7296f ceph: do not print extended format for loggers.
When using the "errors" package, using `%+v` (extended format),
each Frame of the error's StackTrace will be printed in detail.
Let's only print `%v` to print the error.
If the error has a Cause it will be printed recursively.

Basically `%+v` has been replaced with `%v` for all `error` type
interfaces, whether the logger is Info, Warning or Error.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-12-16 18:35:54 +01:00
Sébastien Han 9b6ad00f4d Merge pull request #4308 from leseb/storage-class-io-tuning
ceph: add CR flag to tune slow device class for OSD on PVC in the Cloud
2019-12-16 17:45:01 +01:00
Sébastien Han 0a1d700927 ceph: osd tune startup flags when running on GP2
gp2 devices present themselves as SSDs,
but have much more variable performance.
Ceph attempts to adjust some settings based on the drive type,
HDD/SSD
In this case client I/O can be impacted too much by assuming gp2 devices are like other SSDs
(an example is https://bugzilla.redhat.com/show_bug.cgi?id=1765923#c6)

In order to prevent this, rook can set the following for OSDs
if the new CR setting `tuneSlowDeviceClass` is set to `true`:

```
osd_recovery_sleep = 0.1
osd_snap_trim_sleep = 2
osd_delete_sleep = 2
```

Closes: https://github.com/rook/rook/issues/4298 and https://bugzilla.redhat.com/show_bug.cgi?id=1771047
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-12-16 16:37:02 +01:00
Dmitry Yusupov 1fd1938234 Merge pull request #4505 from dyusupov/master
EdgeFS documentation corrections and 1.2 release notes
2019-12-13 17:22:48 -08:00