Commit Graph
1134 Commits
Author SHA1 Message Date
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 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
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
Travis Nielsen f8f2e009e9 Merge pull request #4456 from leseb/nfs-ganesha
ceph: change ceph-nfs pid location
2019-12-09 13:17:51 -07:00
Blaine Gardner af822018e3 ceph: osd: filestore: fix filename too long error
Add osd-max-object-{name,namespace}-len flags to filestore OSDs to avoid
`ERROR: osd init failed: (36) File name too long` errors.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-12-09 10:41:54 -07:00
Sébastien Han 80ba8ab2ad ceph: change cep-nfs pid location
Let's put the PID under the directory owned by ganesha.

Closes: https://github.com/rook/rook/issues/3525
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-12-09 18:21:37 +01:00
Sébastien Han 5ce2ed220e ceph: use "github.com/pkg/errors"
We now use the error package.
Kubernetes errors have been renamed kerrors since they are lower than
'errors'.

Closes: https://github.com/rook/rook/issues/4054
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-12-09 16:58:32 +01:00
Travis Nielsen 6a66e010ad Merge pull request #4445 from travisn/continue-on-node-missing
Continue orchestration on missing node for osd
2019-12-09 08:05:36 -07:00
Mateusz Los 0daec4a7d6 ceph: change rgw client prefix
add rgw prefix to objectstore user

Signed-off-by: Mateusz Los <los.mateusz@gmail.com>
2019-12-09 12:49:24 +01:00
Mateusz Los 50f3d29cf4 ceph: client controller tests and docs
ceph client CRD refactoring
Add info about client crd to documentation
Add tests for client controller CRD

Signed-off-by: Mateusz Los <los.mateusz@gmail.com>
2019-12-09 12:48:44 +01:00
Mateusz Gozdek 65fd8ece2a ceph: Create initial client controller code
Create initial client controller code

Signed-off-by: Mateusz Los <los.mateusz@gmail.com>
2019-12-08 16:47:57 +01:00
Travis Nielsen 618028d2cd ceph: continue orchestration on missing node for osd
When a node has been removed, cordoned, or is otherwise
missing from the filters that rook uses to evaluate deploying
osds on nodes, the orchestration should continue instead
of failing. Otherwise, the orchestration will stay stuck
in a retry loop if any nodes are cordoned or removed in
the middle of an orchestration.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-12-06 15:48:19 -07:00
Sergey Kaydalov b6b95d44ed edgefs: payloads on an S3 service
Added support for data chunk forwarding to an external S3 service

Signed-off-by: Sergey Kaydalov <kayserg@gmail.com>
2019-12-06 19:16:43 +02:00
dulltzandSatoru Takeuchi dfe45ac6b0 ceph: support OSD on PVC backed by LV
"OSD on PVC" doesn't work for PV backed by LV. Fixing this problem
by the following changes.

- Rook accepts LVM disk type.
- If a LV-backed device is passed, Rook/Ceph invokes
  "ceph-volume lvm prepare" with "--data vg/lv"
  instead of "--data /path/to/device".
- If a LV-backed device is passed, Rook/Ceph suppresses
  activation/deactivation of VG that owns this LV.

Fixes: https://github.com/rook/rook/issues/4185
Signed-off-by: dulltz <isrgnoe@gmail.com>
Co-authored-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2019-12-05 17:26:27 +00:00
Sébastien Han e108f87b06 Merge pull request #4386 from leseb/location-prepare
ceph: do not restart the osds when upgrading the operator
2019-12-05 16:59:33 +01:00
Travis Nielsen 0a352f64d9 Merge pull request #4285 from cybozu-go/use-mapper-name
ceph: support device selection for OSDs by device path name patterns
2019-12-05 07:54:07 -07:00