Commit Graph
1588 Commits
Author SHA1 Message Date
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
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
Sébastien Han 9cb752a874 ceph: rgw fix --id and remove --name
Both --id and --name do the same thing, so let's use one only: --id
which is shared accross all the daemons already.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-12-11 15:24:42 +01:00
Sébastien Han dde9e189b4 ceph: rgw fix fronted flag
rgw needs the fronted on its cli line to select the fronted as well the
port. This option is not supported in the mon config store.

Closes: https://github.com/rook/rook/issues/4471
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-12-11 15:24:26 +01:00
n.fraison b9c2d616ab ceph: enforce pod anti affinity on gateways if hostNetwork is true
As performed with mon, gateways from same ceph object store
must not run on the same host if hostNetwork is set to true

Signed-off-by: n.fraison <n.fraison@criteo.com>
2019-12-11 14:53:07 +01:00
Sébastien Han f56d618568 ceph: add missing ownerref to csi secrets
CSI secrets were missing OwnerReference so when csi went away secrets
were remaining. Now this is fixed.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-12-11 10:35:53 +01:00
Sébastien Han 6051a3ca26 ceph: controller accept multiple changes at once
If editing the cluster CR we must update the spec to reflect its new
content. Now the spec is updated so we can update with an unsupported
image as well as setting allowUnsupported: true.
It was not possible before we had to restart the operator, now we can do
it as an update.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-12-11 10:35:53 +01:00
Sébastien Han b26c614ecf ceph: crash do not use selector = label
We must not default the selectors to the labels since labels can be
changed and selector cannot until the deployment is updated.
This way the deployment was failing with:

2019-12-10 10:48:13.414438 E | ceph-crashcollector-controller: node reconcile failed on op "unchanged": Deployment.apps "rook-ceph-crashcollector-minikube" is invalid: spec.template.metadata.labels: Invalid value: map[string]string{"app":"rook-ceph-crashcollector", "ceph-version":"15.0.0", "ceph_daemon_id":"crash", "crashcollector":"crash", "kubernetes.io/hostname":"minikube", "node_name":"minikube", "rook-version":"v1.2.0-3.g8d3b85306.dirty"}: `selector` does not match template `labels`

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-12-11 10:35:53 +01:00
Sébastien Han e91cf1ac1d ceph: crash retry in seconds
The loop wasn't using seconds for its retry so the crash controller
would simply crash since the version is used later in the pod spec.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-12-11 10:35:53 +01:00
Sébastien Han 9efce968a0 ceph: expose build number on ceph version label
The pod label now shows the build number too.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-12-11 10:35:53 +01:00
Travis Nielsen 3294384da7 Merge pull request #4415 from leseb/use-minor-version
rook-ceph: stop using ceph version with timestamp and bump to 14.2.5
2019-12-10 08:14:51 -07:00
Sébastien Han 68fd4f4df9 rook: stop using ceph version with timestamp
With https://github.com/ceph/ceph-container/pull/1529, we now build
vX.X.X version so we don't need to have the timestamp. Also we will
automatically get the last changes from the OS/packages too more
frequently.

Closes: https://github.com/rook/rook/issues/4414
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-12-10 11:39:35 +01:00
Nizamudeen 910fe6f980 ceph: make the udevfilter into configurable
Added default regex values.
Created an environment variable and using that variable the user can give custom regex values
Updated the PendingReleaseNotes.md
Signed-off-by: Nizamudeen <nia@redhat.com>
2019-12-10 10:07:30 +05:30
Dmitry Yusupov f842c60116 Merge pull request #4432 from SergeyKaydalov/edgefs-s3-payload
EdgeFS: support for payload on external S3 server
2019-12-09 20:01:37 -08:00
Blaine Gardner caba125b84 Merge pull request #4370 from SUSE/osd-refactor-legacy
Ceph: OSD: refactor config for filestore OSDs
2019-12-09 16:20:17 -07:00
Blaine Gardner 94822e0318 Merge pull request #4460 from travisn/revert-nfs-pid
Revert nfs operator pid location
2019-12-09 16:16:29 -07:00
Travis Nielsen c9976ee313 Merge pull request #4366 from egafford/label-crash-collector
ceph: add rook-version and ceph-version tags to crash deployment
2019-12-09 15:26:17 -07:00
Travis Nielsen b94a99fb6e nfs: revert nfs operator pid location
Integration tests are failing with the ganesha pid
location. No need for this argument.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-12-09 14:31:03 -07:00
Blaine Gardner 003b870d8f ceph: osd: disable creation of new filestore osds
Creation of new filestore OSDs is being deprecated as per
https://github.com/rook/rook/issues/3379

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-12-09 14:15:13 -07:00
Blaine Gardner 64bad24712 ceph: osd: do not init ceph.conf for filestore osd
Just as with the mon, mgr, mds, rgw, and rbd-mirror daemons, do not
generate a ceph.conf in an init container for filestore OSDs.
Instead use the commandline to supply all the needed arguments for
running these OSDs.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-12-09 14:15:12 -07:00
Elise Gafford c379e116a9 ceph: add rook-version and ceph-version tags to crash deployment
This change adds rook-version and ceph-version tags to crash
collector deployments, in keeping with other Ceph deployments.

Resolves: #4357
Signed-off-by: Elise Gafford <egafford@redhat.com>
2019-12-09 16:11:08 -05:00