Commit Graph
1607 Commits
Author SHA1 Message Date
Travis Nielsen 9a078bf9e6 minio: remove from rook
The minio operator has not had community support nor
any updates since being added to Rook. Support is being
removed from Rook due to this lack of community interest.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-01-08 15:45:21 -08:00
Travis Nielsen 044140fc1a Merge pull request #4626 from SUSE/topology-label
core: k8s 1.17 zone/region failure domain labels
2020-01-08 15:23:18 -08:00
Dmitry Yusupov 66779092a0 Merge pull request #4623 from nizamial09/var_shadow
edgeFS: Took care of the Variable shadowing in ConfigMap
2020-01-07 14:18:41 -08:00
Travis Nielsen e2dcfc6330 util: no verbose logging for retry messages
The retry messages are too verbose with the stack trace
since the aggregated messages were added. This change
turns off the verbose message.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-01-07 12:18:54 -07:00
Sébastien Han 05aa639317 ceph: add option to continue on unclean PGs
A new CRD option `continueUpgradeAfterChecksEvenIfNotHealthy` is added.
When upgrading, Rook goes OSD by OSD and then waits for PGs to be clean
before proceeding to the next OSD. Currently, Rook waits for 5 hours but
there might be circumstances where PGs need more time to settle.
Thus setting `continueUpgradeAfterChecksEvenIfNotHealthy` to true will
pursue the upgrade process, even if PGs are not 100% active+clean.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1786029
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-07 12:18:54 -07:00
Blaine Gardner facc473f59 core: k8s 1.17 zone/region failure domain labels
Add support for the k8s 1.17 official zone/region failure domain labels.
Our earlier guess that the official labels would be
<failure-domain.kubernetes.io> was wrong; the official is now
<topology.kubernetes.io>.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2020-01-07 11:52:28 -07:00
Travis Nielsen 43a66f2a8b Merge pull request #4621 from travisn/operator-kit-dependency
Remove operator kit dependency
2020-01-07 11:03:28 -07:00
Travis Nielsen 7fa0032027 Merge pull request #4585 from jmolmo/issue_4567
ceph: Avoid invalid execution state
2020-01-07 10:05:15 -07:00
Travis Nielsen d0c7d28a63 build: remove operator kit dependency
The operator kit had more utility originally when the operator
was creating and managing the TPRs and CRDs directly. Since
the CRDs are now created from a manifest and no longer by the
operators, the utility of operator kit is limited to the
controller watcher. Since we are moving to the controller runtime
we simplify the code to make the transition smoother. Now
there is only a simple WatchCR method that will need to be
replaced as we maek that transition.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-01-07 08:30:14 -07:00
Nizamudeen 700d280971 edgeFS: Took care of the Variable shadowing in ConfigMap
This commit fixes the variable shadowing in configMap which leads to a potential misconfiguration.

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

Signed-off-by: Nizamudeen <nia@redhat.com>
2020-01-07 12:04:34 +05:30
Nizamudeen 729b883dc8 ceph: Generating a strong ceph dashboard password
Replaced `math/rand` with more secure `crypto/rand` which will generate CSPRNG.
Changed the length of dashboard password from 10 to 20 and included more special characters that can strengthen password.

Passwords before this change: QoMmqLkaOf,8tqTyWF1sZ
Passwords after this change: L{QZ@_c'Rl7$uvW:UHU1, fP-OjX`UVw0J0Ka/scS(

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

Signed-off-by: Nizamudeen <nia@redhat.com>
2020-01-06 15:44:23 +05:30
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
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
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
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
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 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
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
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
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
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
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
Dmitry Yusupov 500f8851a8 Merge pull request #4514 from sabbot/prevent-configuration-deletion
EdgeFS: prevent configuration removal
2019-12-16 13:48:51 -08: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
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 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
Travis Nielsen e46b71f25e Merge pull request #4504 from travisn/no-block-owner-ref
Set discover ownerrefs without blocking parent deletion
2019-12-13 17:24:06 -07:00
Dmitry Yusupov f87fff972f Merge pull request #4501 from sabbot/restapi-local-repo
edgefs: Fix restapi image selection
2019-12-13 15:39:37 -08:00
Travis Nielsen 5d24710fd2 ceph: set discover ownerrefs without blocking parent deletion
An owner reference cannot be set with BlockOwnerDeletion: true
if the operator does not have privs to add a finalizer to the parent.
The discover resources don't need to block deletion based on the
parent so we remove that property from the owner reference.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-12-13 15:22:21 -07:00
Anton Skriptsov 1d7c26f23b edgefs: Fix restapi image selection
Signed-off-by: Anton Skriptsov <sabbotagge@gmail.com>
2019-12-13 14:12:13 -08:00
Travis Nielsen fbf3837f13 ceph: stop removing osds for any cephcluster CR update
Removing an OSD unintentionally can result in data loss,
which is to be prevented at all costs. Rook's functionality
to remove OSDs automatically when a node was removed from the
cluster CR has led on several occasions to users having OSDs
unintentionally removed from their cluster.

If the admin decides they really need to remove OSDs they should
do it as a one-time action that they intentionally run
rather than the operator attempting to manage the deletion
with desired state. The risk of misinterpreting the desired
state, even with a typo, is too great.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-12-13 08:26:23 -07:00
Blaine Gardner c4061f8068 Merge pull request #4469 from rohan47/add_version_check
Ceph: Added version check for ceph osd safe-to-destroy command
2019-12-12 15:14:29 -07:00
Sébastien Han f01ce9804c Merge pull request #4483 from leseb/owner-ref-discover
rook: add missing owner references to the discover daemon
2019-12-12 19:46:03 +01:00
rohan47 6dfc2c139f Ceph: Added version check for ceph osd safe-to-destroy command
It's not 100% safe since before Nautilus osd safe-to-destroy command
didn't have any json output. So added a version check.

Signed-off-by: rohan47 <rohgupta@redhat.com>
2019-12-13 00:07:39 +05:30
Travis Nielsen 1d30cce864 Merge pull request #4423 from leseb/ceph-crash-key
ceph: add crash key
2019-12-12 11:29:10 -07:00
Sébastien Han 991c8d6e4d Merge pull request #4484 from mkogan1/rgw-healthcheck
ceph: rgw change the liveness probe url
2019-12-12 18:06:43 +01:00
Sébastien Han 2396e64525 rook: add owner reference to discover cm
Add owner reference to the discover config map so that when the
discover pod goes away we also remove its configmap.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-12-12 15:10:06 +01:00
Mark Kogan 3c807688fe ceph: rgw change the liveness probe url
to the RGWs swift objectstorage healthcheck api url [1]
which resolves an OCS false-positive CLBO of the RGW pod.

[1] https://docs.openstack.org/swift/latest/middleware.html#healthcheck

Signed-off-by: Mark Kogan <mkogan@redhat.com>
2019-12-12 12:47:11 +02:00
Sébastien Han 90b4e74457 rook: add owner reference to the discover daemon
Attach owner reference to the discover daemon set so that when the
opetator goes away, the discover pod gets removed too.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-12-12 11:07:18 +01:00
Sébastien Han 440a68f57e ceph: add crash key
As of 14.2.5, the crash collector pod will use the client.crash user
instead of the client.admin keyring to post crash dumps.

Closes: https://github.com/rook/rook/issues/4388
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-12-12 09:05:38 +01:00
Blaine Gardner adfc1ef9a9 Merge pull request #4457 from ashangit/gateways_podantiaffinity
ceph: enforce pod anti affinity on gateways if hostNetwork is true
2019-12-11 12:02:42 -07:00
Sébastien Han 1e0ec0467f Merge pull request #4472 from leseb/rgw-fronted-flag
ceph: fix rgw liveness probe error
2019-12-11 16:45:57 +01:00