Commit Graph
1916 Commits
Author SHA1 Message Date
Sébastien Han 8b65eb6126 ceph: do not enable ShareProcessNamespace if HostPID
If HostPID is enabled, this means the Ceph version is older than Octopus
and we are still running OSD with HostPID due to an internal
inter-process check.
If the log collector is enabled we need to enable ShareProcessNamespace
**only** if HostIPC is disabled.

Both HostPID and ShareProcessNamespace cannot be enabled.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-01 18:23:19 +01:00
Sébastien Han efefb557a8 Merge pull request #7111 from leseb/fix-1922108
ceph: do not enable ShareProcessNamespace if HostIPC
2021-02-01 17:18:58 +01:00
Travis Nielsen 661b8c7336 Merge pull request #7075 from sp98/timeout-radosgw-admin-cmd
ceph: timeout `radosgw-admin` cli commands
2021-02-01 09:10:18 -07:00
Travis Nielsen d150980241 ceph: skip logging error for mon pdbs if single mon
If there is a single mon, we don't expect the PDBs to be created
and neither do we need to log that it is an error condition.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-02-01 07:57:53 -07:00
Sébastien Han 260274cdb3 ceph: do not enable ShareProcessNamespace if HostIPC
If HostIPC is enabled, this means the Ceph version is older than Octopus
and we are still running OSD with HostIPC due to an internal
inter-process check.
If the log collector is enabled we need to enable ShareProcessNamespace
**only** if HostIPC is disabled.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-01 15:50:16 +01:00
Santosh Pillai 113376f1ab ceph: timeout radosgw-admin cli commands
When creating object store, `radosgw-admin realm get ..` command is stuck forever when required number of OSDs are not available. Because of this the uninstall of object store is also stuck. User has to manually remove the finalizer to delete the object store.This PR uses `ExecuteCommandWithTimeout` for running `radosgw-admin` command. Timeout during installation will be reconciled. Cleanup will be treated as best effort. Any errors during uninstalling of single site object store will only be logged.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2021-02-01 10:57:04 +05:30
Blaine Gardner 1761874da2 Merge pull request #6999 from rohan47/clean_terminating_pods
ceph: clean pods stuck in terminating state on a failed node
2021-01-29 13:15:36 -07:00
Travis Nielsen 0a1bfe575c Merge pull request #7062 from leseb/cephfs-mirror
ceph: add cephfs mirroring support
2021-01-29 09:09:56 -07:00
Santosh Pillai 5831c0f0d0 ceph: add --public-addr args to ceph mds command
add --public-addr=<podIP> args to ceph mds command when host network is not enabled.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2021-01-28 12:40:42 -07:00
Travis Nielsen 4f7250298c Merge pull request #7084 from travisn/maxmonid-commit
ceph: Only commit the maxmonid after starting a mon daemon
2021-01-28 11:30:10 -07:00
Sébastien Han c0123cf182 ceph: add cephfs mirroring support
With Ceph Pacific, Rook can now deploy the cephfs-mirror daemon.
This initial commit covers the deployment of a single daemon only.
Multiple mirror daemons is currently untested.
Only a single mirror daemon is recommended.

The configuration of peers will come in a later PR since the mgr module
is still pending upstream: https://github.com/ceph/ceph/pull/39050

The same goes for integration tests, they will get added later once we
start testing on Pacific.

Closes: https://github.com/rook/rook/issues/7002
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-01-28 19:21:18 +01:00
rohan47 0876a20e7c ceph: clean pods stuck in terminating state
when a node fails some pods remains in terminating while other manage to
be rescheduled on another node successfully.
this commit adds code to clean up all the Rook and CSI pods that are stuck in terminating
state on a failed node.

Signed-off-by: rohan47 <rohgupta@redhat.com>
2021-01-28 23:21:53 +05:30
Blaine Gardner 2caeb8bfe3 Merge pull request #6833 from sp98/configure-osd-upgrade-timeout
ceph: configure health check timeout for OSDs when upgrading
2021-01-28 09:46:12 -07:00
Sébastien Han 920381d677 Merge pull request #7077 from jshen28/fix-disable-mds-liveness-probe
ceph: fix mds liveness probe
2021-01-28 11:04:20 +01:00
Sébastien Han d7610b7e6f ceph: use errors package instead of fmt
Small fix since all the ceph codebase is using the errors package.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-01-28 08:51:48 +01:00
Travis Nielsen 4fa3c04e44 ceph: only commit the maxmonid after starting a mon daemon
The maxMonId should only track the mons that have been committed to starting.
Currently the maxMonId was tracking all mon scheduling. If the reconcile
was aborted or failed, or the operator restarted in a reconcile, the
maxMonId was being reset by analyzing the mon deployments that existed.
This does not work for scenarios where mon quroum is lost and being
reset to a single mon. Now the maxMonId will only be incremented
when a mon daemon is started, and will never be decremented after
that to ensure that new mons will be incremented to the next id.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-01-27 16:33:36 -07:00
Travis Nielsen 5cf3338bcd ceph: prevent operator crash with host networking and mon not found
When the node is not found for mon assignment with host networking
enabled, the operator may crash. This change ensures the node is
not nil and returns an error instead of crashing.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-01-27 15:34:16 -07:00
Sébastien Han f841c1b211 Merge pull request #7071 from travisn/osd-args-ordering
ceph: Consistently order the osd args to avoid restarts
2021-01-27 16:47:36 +01:00
Travis Nielsen 475260de35 Merge pull request #6875 from Madhu-1/fix-6830
ceph: add option to set FSGroupPolicy for CSI PVC
2021-01-27 08:34:45 -07:00
ushen 9bd2150d5e ceph: fix mds liveness probe
Previous patchset does not work before, because
`ConfigureLivenessProbe` does not directly modifies
input variable.

Signed-off-by: ushen <yshxxsjt715@gmail.com>
2021-01-27 20:27:24 +08:00
Santosh Pillai 4237aa7ecc ceph: configure health check timeout for OSDs when upgrading
added waitTimeoutForHealthyOSD in the cluster crd that defines the time (in minutes) the operator would wait before an OSD can be stopped for
upgrade. This PR also removes the ok-to-continue logic for osds as its already handled by ok-to-stop. The default value is 10 minutes.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2021-01-27 11:13:05 +05:30
Travis Nielsen 570cba9b4e ceph: consistently order the osd args to avoid restarts
The settings for tuneDeviceClass and tuneFastDeviceClass were
stored as a map[string]string. When iterating over the map to
append the args, the args were being appended in an unpredictable
order. The order could change every reconcile, resulting in an
unnecessary OSD restart potentially every reconcile. Now we iterate
over a slice that will be ordered predictably and ensure OSDs
will not be restarted when not needed.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-01-26 17:23:01 -07:00
Travis Nielsen 4b43e7afa5 ceph: allow removal of arbitrary osds on pvcs and simplify pvc names
OSDs on PVCs previously were always replaced with PVCs of a given name.
For on-prem scenarios where the OSDs might need to be removed instead
of replaced, the operator now allows holes to exist in the PVC index
names as long as there are a sufficient number of PVCs to meet the
criteria for the deviceSet.count.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-01-26 14:38:12 -07:00
Travis Nielsen 4b7cc5227a Merge pull request #7066 from travisn/remove-edgefs
build: Remove the EdgeFS operator from Rook
2021-01-26 11:30:07 -07:00
Travis Nielsen 53ed11f15b build: remove the edgefs operator from rook
The EdgeFS operator has been deprecated for some time in Rook.
If the replacement is added back to Rook it can be completed
according to the new guidelines in the documentation.
https://rook.io/docs/rook/master/storage-providers.html

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-01-25 17:51:24 -07:00
ron1 1e64b82b64 ceph: set ProgressingCompleted CephCluster status condition type
Set ProgressingCompleted CephCluster status condition to include type cephv1.ConditionProgressing

Closes: https://github.com/rook/rook/issues/7055
Signed-off-by: ron1 <ron18219@gmail.com>
2021-01-25 10:09:07 -05:00
Sébastien Han 720380e3d3 Merge pull request #7024 from travisn/remove-cockroachdb
build: Remove the CockroachDB operator from Rook
2021-01-25 10:04:44 +01:00
Sébastien Han 28c78b9204 Merge pull request #7044 from leseb/fix-7022
ceph: update rgw and mds deployment for logCollector
2021-01-25 09:29:40 +01:00
Sébastien Han ebbf332d8d ceph: update rgw and mds deployment for logCollector
If the CephCluster CR spec is updated to activate the logCollector, we
must reflect that change onto child CRDs, like the mds and rgw since
their configurationn would be impacted too.
Now we watch for the CephCluster object changes from the object/file
controllers and react upon the appropriate event.

Closes: https://github.com/rook/rook/issues/7022
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-01-22 18:19:07 +01:00
Jiffin Tony Thottan ee6a03dfb8 ceph: minor update init container script in generateVaultGetKEK
Replacing VAULT_KV_VERS with VAULT_BACKEND for specifing version of kv engine.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2021-01-22 16:04:35 +05:30
Madhu Rajanna e305810bf0 ceph: add option to set FSGroupPolicy for CSI PVC
in kubernetes 1.19 it added a support to set FSGroupPolicy
in the csidriver object, same supported is added to both
CephFS and RBD. where user will have an option to set
the FSGroupPolicy for CephFS and RBD separately.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-01-22 14:26:56 +05:30
Jiffin Tony Thottan da61c9a83e ceph: vault kms configuration for ceph object store
The first patch to configure vault for ceph object store. If the `security.kms` configured in
`clusterSpec` CRD, RGW will be configured with vault kms settings to handle SSE request from s3 clients.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2021-01-22 10:44:03 +05:30
Travis Nielsen b9fc942d65 Merge pull request #7041 from leseb/notify-upgrade
ceph: update rbd-mirror when cluster is upgraded
2021-01-21 10:55:02 -07:00
Sébastien Han 47a02145e7 ceph: update rbd-mirror when cluster is upgraded
The rbd-mirror was left being when the CephCluster was upgraded.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-01-21 18:23:20 +01:00
Sébastien Han dff0a46a35 ceph: fix incorrect camelcase
Golang use camel cases, so localcephNFS should be localCephNFS.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-01-21 18:22:27 +01:00
Madhu Rajanna 05c75b7084 ceph: add support to disable snapshotter sidecar
In some cases the user dont want to run snapshotter
container either for CephFS or RBD. In that case the
user wont install the required snapshot CRD's due
to that the snapshotter sidecar container produces
lot of noisy logs.
Snapshotter will be enabled by default for both
CephFS and RBD, but with this PR we are providing
an option to disable snapshotter sidecar deployment
either for CephFS or RBD.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-01-21 15:29:55 +05:30
Sébastien Han 9f8404e330 ceph: add quincy version
Quincy just started https://github.com/ceph/ceph/pull/38996 so let's add
it to our version code.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-01-21 08:50:41 +01:00
Travis Nielsen 2294851ca3 build: remove the cockroachdb operator from rook
The cockroachDB operator has not had community support in Rook.
Therefore, the time has come to deprecate and remove it.
If the sources are still needed, there is always git history.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-01-20 17:28:58 -07:00
Sébastien Han 093ed7dd62 Merge pull request #6984 from leseb/core-dumps-dir
ceph: set process working dir to /var/log/ceph
2021-01-20 10:39:42 +01:00
Satoru Takeuchi 0512c7d33c Merge pull request #6793 from cybozu-go/ceph-fix-osd-corruption
ceph: avoid potential osd corruption due to wrong file-lock
2021-01-20 09:39:39 +09:00
Sébastien Han 2bb9444130 Merge pull request #6974 from cybozu-go/ceph-delete-discovery-daemon-after-disabling-it
ceph: delete discovery daemon if it is disabled
2021-01-18 11:36:21 +01:00
Satoru Takeuchi ae8dcf7cc3 ceph: fix osd corruption
Multiple OSD pods for the same OSD might run simultaneously becasue OSD pod
is managed by Deployment resource. However, OSD locking mechanism
doens't work because the lock file (fsid file) exist for each OSD pod.
It resutls in OSD corruption.

Closes: https://github.com/rook/rook/issues/6530

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2021-01-18 03:11:50 +00:00
Travis Nielsen f7013884b4 Merge pull request #6972 from jshen28/improve-cluster-upgrade-observibility
ceph: exposing which node/osd is processing
2021-01-15 14:32:53 -07:00
Satoru Takeuchi 1be47ea0b8 ceph: delete discovery daemon if it is disabled
discovery-daemon still exists even if it's disabled.

Closes: https://github.com/rook/rook/issues/6936

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2021-01-15 19:44:40 +00:00
Sébastien Han 758226294b ceph: convert CephClient CRD to controller-runtime
This was the last remaining CRD to not use the controller-runtime
library.
Small additions were added with the transition:

* the Kubernetes Secret that contains the CephX key has now an owner
  reference to the CephClient object
* the secret name is present in the Status field of the CephClient:

```
status:
  info:
    secretName: rook-ceph-client-glance
  phase: Ready
```

The controller will reconcile on CR updates and also if the Kubernetes
Secret is deleted.

Closes: https://github.com/rook/rook/issues/4938
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-01-15 16:17:38 +01:00
shenjiatong 0d80cc396d ceph: exposing which node/osd is processing
it would be more firendly to cloud operators to
know which node is being processed during
upgrade

Signed-off-by: shenjiatong <yshxxsjt715@gmail.com>
2021-01-15 23:12:26 +08:00
Sébastien Han cb7d600841 ceph: set process working dir to /var/log/ceph
By setting the working directory of a Ceph daemon to the log direcor
(which is bindmounted to the host), we can ensure that the coredumps
will be available.

On CentOS 7 **only**, the kernel is configured with:

```
cat /proc/sys/kernel/core_pattern
core
```

which means that the coredumps will end up in the process working
directory and will be named "core".

On CentOS 8, everything is different and this won't work but still
CentOS will be able to consume this and changing the working directory
is harmless.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-01-15 16:06:42 +01:00
Travis Nielsen ea29665a8a ceph: during object store deletion return success if not found
If the object store is not found during deletion of the object store CR,
proceed with the deletion instead of blocking and re-queueing the
deletion reconcile in an endless loop. This was causing instability
in the integration tests.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-01-13 15:44:28 -07:00
Sébastien Han 22721f1df8 Merge pull request #6949 from leseb/bump-controller-runtime-0.7
core: bump to controller-runtime 0.7.0 version
2021-01-13 17:16:13 +01:00
Sébastien Han 7558d37420 core: bump to controller-runtime 0.7.0 version
Now using https://github.com/kubernetes-sigs/controller-runtime/releases/tag/v0.7.0

Closes: https://github.com/rook/rook/issues/6689
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-01-13 11:00:43 +01:00