Commit Graph
3904 Commits
Author SHA1 Message Date
Travis Nielsen 22dea0a1ef mon: disable startup probe on canary pods
The canary pods are very short-lived pods and are not
running ceph in any form. The startup probe was mistakenly
enabled for the canary pod, which could cause the pod
to fail unexpectedly if the startup probe was triggered
after the delay timeout.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-03-10 12:19:55 -07:00
Travis Nielsen 03c7164b15 mon: options for enabling msgr2 encryption and compression
msgr2 allows for encryption and/or compression across the wire.
Settings for enabling the encryption and compression are now
available in the cluster CR to that ceph will be automatically
configured with these settings when desired.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-03-10 11:50:42 -07:00
Travis Nielsen 9f6804515c mon: enable msgr2 by default for new mons
New mons all support msgr2, so there is no need to keep the default
msgr1 port for new mons.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-03-10 11:48:47 -07:00
Travis Nielsen 2b2231eb0c mon: no need to enable msgr2 since nautilus
Since Nautilus, mgr2 is already enabled by default. No longer
does the operator need to enable msgr2 after the mons are
configured or upgraded.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-03-10 11:48:47 -07:00
Travis Nielsen 8bce38fadb csi: populate mon endpoints even if driver not enabled
If the csi driver was enabled at a later time, the mon endpoints
would not be populated. The populate the csi config, either a new
cluster reconcile or restarting the operator would be necessary.
It is simpler just to update the csi configmap with every reconcile
even if the csi driver is not enabled.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-03-10 10:20:58 -07:00
Travis Nielsen 76b349d808 csi: log a warning if pod namespace env var not found
If the pod namespace was not found by the csi helper to update
the mon endpoints configmap, the reconcile was failing. To allow
for the update to continue in unit tests and ignore the env var,
we only log the warning instead of failing the reconcile.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-03-10 10:20:51 -07:00
Travis Nielsen a181988f6d Merge pull request #9868 from TomHellier/9867-fix-to-csi-plugin-provisioner-resources
core: fix empty string bug
2022-03-09 10:40:12 -07:00
Travis Nielsen 41ca6f6f5c Merge pull request #9847 from parth-gr/cluster-status-fsid
core: sync ceph fsid on cephcluster status
2022-03-09 10:37:06 -07:00
parth-gr 2e89ff0fd9 core: sync ceph fsid on cephcluster status
FSID will be updated with cephcluster CR status
when monitoring check get start

Signed-off-by: parth-gr <paarora@redhat.com>
2022-03-09 21:57:37 +05:30
Tom Hellier 59b4c57406 core: fix empty string bug
This function was always using an empty string, instead of the extracted resources

Closes: #9867
Signed-off-by: Tom Hellier <me@tomhellier.com>
2022-03-09 16:11:19 +00:00
Blaine Gardner b640969a64 nfs: remove secret, configmap when downscaling CephNFS
When downscaling CephNFS clusters, be sure to remove secrets and
configmaps. Also be sure to only downscale for the currently-reconciling
CephNFS cluster.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2022-03-08 12:46:13 -07:00
Travis Nielsen bc6381169e core: disruption controller log ceph errors in debug level
The controller for disruption budgets is verbose at cluster creation
when the cluster is not yet created, which generates a lot of noise
in the log that makes the cluster look unhealthy. This is an expected
condition, so we can change this logging to debug level.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-03-03 14:36:27 -07:00
Travis Nielsen 08aed0213c Merge pull request #9567 from Madhu-1/fix-9220
csi: add custom ceph.conf for csi pods
2022-03-01 08:19:02 -07:00
Madhu Rajanna 2076a3c788 csi: add custom ceph.conf for csi pods
Currently, the admin/user can configure the ceph.conf
for daemon pods using https://rook.io/docs/rook/v1.7/
ceph-advanced-configuration.html#custom-cephconf-settings.
This the above custom ceph.conf is only for ceph pods.
the support to provide constom ceph.conf for cephcsi
is added in cephcsi PR 2476

This PR adds the support to create/update
ceph.conf for csi pods.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-03-01 12:42:59 +05:30
Travis Nielsen b3ca0f1b87 osd: purge job will remove all pvcs for the osd
The purge job is intended to clean up all the resources
related to an OSD that is to be removed. An OSD with
a metadata, wal, and data PVC was only cleaning up the
data PVC. Now the metadata and wal PVCs will also be
cleaned up.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-02-24 12:05:15 -07:00
Travis Nielsen 1f8f71b396 file: allow filesystem removal even with failures
If the filesystem is in a bad state such as never being
created successfully in the first place, the filesystem
removal will continuously fail and prevent the CR from
being removed. Thus, we treat the filesystem removal
as a best effort and log the issue instead of failing
the uninstall reconcile.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-02-23 16:01:58 -07:00
parth-gr 413662d475 core: change livenessProbe file name to probes
Added unit test for probes changes and
did re-naming of liveness probes file
as it will contain multiple types of probes

Signed-off-by: parth-gr <paarora@redhat.com>
2022-02-23 17:20:07 +05:30
parth-gr 2cf89b11df rgw: use ceph config probes for rgw
use the common method ConfigureStartupProbe and
ConfigureLivenes probe for rgw probes configuration

Signed-off-by: parth-gr <paarora@redhat.com>
2022-02-22 20:36:40 +05:30
parth-gr 1679af4a02 mds: override mds startup liveness probes from CephFilesystem CR
Rook code allows overriding the probes for mds from the CephCluster,
but this should really come from the CephFilesystem CR.

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

Signed-off-by: parth-gr <paarora@redhat.com>
2022-02-22 20:36:40 +05:30
Sébastien Han 3f97132fd1 Merge pull request #9751 from thotz/set-default-for-zone-zonegroup-external-rgw
object: set default zone/zonegroup/realm values for external rgw
2022-02-22 09:15:02 +01:00
Jiffin Tony Thottan 022645f71d object: set default zone/zonegroup/realm values for external rgw
currently if multisite is not configured Rook sets values for
zone/zonegroup/realm as object store name which is only valid for
internal ceph object store. This may not exists for rgw running in
external cluster.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2022-02-21 14:25:24 +05:30
Sébastien Han 3b0547a88c Merge pull request #9760 from leseb/fix-external-cluster-csi-validation
core: various external mode enhancements
2022-02-17 16:44:17 +01:00
Sébastien Han 0143a8f8ee core: remove unnecessary secret validation
We don't need to validate the name of Ceph-CSI secret, simply because
the names can be different. The default example have default names but
since the secret can be created by the administrator we should not
assume anything. This check will fail if the secret names are different
for whatever reason. This is especially true for external mode. In
converged mode Rook creates the secrets on its own if needed to ease the
integration with the default StorageClass examples.

Signed-off-by: Sébastien Han <seb@redhat.com>
2022-02-17 15:33:54 +01:00
Sébastien Han 47b8bb989e core: move clusterInfo discovery in converged cluster
The external code has its own mechanism to look up the clusterInfo so
let's move this to the non-external condition to clarify the code.

Signed-off-by: Sébastien Han <seb@redhat.com>
2022-02-17 15:32:37 +01:00
Sébastien Han fdcad15b87 core: check for canceled context in external mode
This is fixing a potential race where the context is canceled and the
external cluster is trying to fetch the cluster info. If the context is
canceled then the loop will be stuck forever. Now we check for the
canceled context and return appropriately.

Signed-off-by: Sébastien Han <seb@redhat.com>
2022-02-17 15:30:25 +01:00
Madhu Rajanna f482b1ceba core: remove rbd_default_features setting
Instead of setting the default values in the Rook
we should use the defaults provided by the ceph
it self. This configuration is causing problem
for the rbd image creation, this is not allowing
the rbd images to have default image features
which comes with librbd.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-02-17 16:08:55 +05:30
Sébastien Han d86351aa1c Merge pull request #9728 from thotz/vault-kms-backendpath-tranist-engine-fix
object: fix backend path for transit engine for rgw kms
2022-02-16 10:21:08 +01:00
Travis Nielsen 1d5b43593e Merge pull request #9718 from travisn/node-placement-logging
osd: Write log message when node is being skipped
2022-02-15 08:14:56 -07:00
Jiffin Tony Thottan 0b4cdb992b object: fix backend path for transit engine for rgw kms
The backend path was added with additional `transit` to it.
Also added PR test case to check transit engine

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2022-02-15 18:49:31 +05:30
Travis Nielsen 476e94632b Merge pull request #9713 from Rakshith-R/cleanup-csi
csi: cleanup csi driver resources when zero cephclusters exist
2022-02-14 13:31:20 -07:00
Travis Nielsen 4570204a1d osd: write log message when node is being skipped
When a node is being skipped for creation of OSDs, log a message
that indicates whether it was from the node being unschedulable,
the node is not ready, or the node does not meet the placement
criteria specified in the cluster CR.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-02-14 12:06:49 -07:00
Sébastien Han 7f32461b8f rgw: fix variable assignment
We need to explicitly assign the ceph version within each scope since
one function returns a pointer and one is not.
Previously, the `desiredCephVersion` was recreated in the scope of the
`else` and thus a new variable `desiredCephVersion` was initialized (see
the `:=`).
Now, each scope creates and assign to clusterInfo a `desiredCephVersion`
value.

Signed-off-by: Sébastien Han <seb@redhat.com>
2022-02-14 12:42:30 +01:00
Sébastien Han c3e02e7295 Merge pull request #9724 from leseb/fix-external-object
object: do not check for upgrade on external mode
2022-02-11 09:32:55 +01:00
Travis Nielsen 2d3839bf41 Merge pull request #9715 from leseb/ix-9714
core: do not dereference a non-pointer
2022-02-10 09:56:08 -07:00
Sébastien Han 856b14e60a object: do not check for upgrade on external mode
The object child controller should not compare versions if the object
store is external. The current version comparison is using the
cmdreporter to check the ceph version of the image in the CephCluster spec.
In external mode, this image is not set so the cmdreporter fails.
Also, this check is only valid for converged mode, so external mode
should be skipped.

Signed-off-by: Sébastien Han <seb@redhat.com>
2022-02-10 17:41:01 +01:00
Sébastien Han 32998cbda4 core: do not dereference a non-pointer
In this case `oldMappingToGo` and `newMappingToGo` were not pointers so
there is nothing to dereference.
This happens when the monitors endpoints configmap is updated, but only
on the pool and file controllers. They are watching for changes on that
configmap so that they can reconcile and upate the bootstrap peers token
when replication is enabled.

Closes: https://github.com/rook/rook/issues/9714
Signed-off-by: Sébastien Han <seb@redhat.com>
2022-02-10 17:11:38 +01:00
Travis Nielsen 8e8c95d342 Merge pull request #9702 from sathieu/registrar_v2.5.0
csi: bump registar image to v2.5.0
2022-02-10 08:59:30 -07:00
Rakshith R 1e9920fb85 csi: cleanup csi driver resources when zero cephclusters exist
This commit modifies ceph-csi controller to be able to cleanup
ceph-csi deployment,daemonset,services & csidriver objects
when no cephcluster exists.

It makes the following changes:
- redundant check for tp.DriverNamePrefix is removed.
- retry to start drivers within reconcile loop is removed,
  controller will retry in case of error now.
- stopDrivers() will now return error in case of failure.
- predicate delete func will now respond to cephcluster deletion.
- CSI resources will be cleaned up when cephcluster does not exist.

Fixes: #9697

Signed-off-by: Rakshith R <rar@redhat.com>
2022-02-09 12:07:34 +05:30
Travis Nielsen 221b3dfb72 object: update pool properties during reconcile
The reconcile was skipping updating most pool properties for
object stores. The implementation of pools between the file,
object, and pool controllers had some duplicate code, so
this change also factors out the common code for better
reuse in a single place. Anytime a pool is created or updated,
it will now consistently update all the pool properties
that are expected to be modifiable.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-02-04 13:41:12 -07:00
Satoru Takeuchi 2d8f9b67c6 core: eliminate unnecessary code
We can eliminate the OSD creation code for Ceph < v15.2.0 because Nautilus(v14.2.z)
is no longer supported. In other words, we can now expect that all newly-created
OSDs on PVC are raw mode.

Please note that the existing lvm mode OSDs on PVCs still be supported after this change.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2022-02-04 13:59:01 +00:00
Mathieu Parent 405dcaadac csi: bump registar image to v2.5.0
Upgrades image:

- k8s.gcr.io/sig-storage/csi-node-driver-registrar: v2.4.0 -> v2.5.0

Detailed changelog:

- https://github.com/kubernetes-csi/node-driver-registrar/blob/v2.5.0/CHANGELOG/CHANGELOG-2.5.md

Signed-off-by: Mathieu Parent <mathieu.parent@insee.fr>
2022-02-04 11:19:43 +01:00
Sébastien Han 49f75c8ec3 subvolumegroup: handle external mode
If the cluster is external, users might still want to take advantage of
the ceph-csi configmap configuration for ceph filesystem subvolume
group. This configuration is handled by the controller whenever a
cephFilesystemSubVolumeGroup CR is created or deleted.
If the present cluster CephCluster is external, the controller
(cephFilesystemSubVolumeGroup) won't handle creation nor deletion of sub volume groups.
It just assumes that the given name is correct and the controller goes ahead with the
ceph-csi configuration.

Closes: #9551
Signed-off-by: Sébastien Han <seb@redhat.com>
2022-02-03 16:28:07 +01:00
Travis Nielsen 096dabfa6c Merge pull request #9578 from micalgenus/fix/pacific-rgw-rolling
rgw: gateway deployment strategy RollingUpdate on Pacific
2022-01-28 08:12:06 -07:00
Sébastien Han 278ca803f9 Merge pull request #9663 from leseb/fix-9544
core: dereference pointer before trying to compare with deepequal
2022-01-28 11:20:29 +01:00
Sébastien Han 5404ec13a2 core: dereference pointer before trying to compare with deepequal
Prior to this, we were comparing a pointer (the memory address) with a
struct. This was obviously always failing and returned false. We must
dereference the pointer to access the data contained at that memory
location.

Closes: https://github.com/rook/rook/issues/9544
Signed-off-by: Sébastien Han <seb@redhat.com>
2022-01-27 17:41:42 +01:00
Madhu RajannaandMathieu Parent cf46615688 csi: bump csi snapshotter image to v5
updating the csi-snapshotter and dependencies
to v5.0.1 released version.

Co-authored-by: Mathieu Parent <mathieu.parent@insee.fr>
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-01-27 21:17:51 +05:30
Travis Nielsen d0ac3b484b Merge pull request #9651 from sathieu/patch-2
Bump csi resizer and volume replication images
2022-01-27 08:30:09 -07:00
Travis Nielsen f9ac966048 osd: merge all osd resources including custom
The merging of OSD resource limits and requests assumed
that only the cpu and memory resources needed to be merged.
It is also possible to set custom resource properties such
as intel.com/sriov_net_in: '1' for use with multus, so
the merging needs to be more general.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-01-26 10:46:54 -07:00
Mathieu Parent 88a449d09c csi: bump csi resizer and volume replication images
Upgraded images:

- k8s.gcr.io/sig-storage/csi-resizer: v1.3.0 -> v1.4.0
- quay.io/csiaddons/volumereplication-operator: v0.1.0 -> v0.3.0

Detailed changelogs:

- https://github.com/kubernetes-csi/external-resizer/blob/release-1.4/CHANGELOG/CHANGELOG-1.4.md
- https://github.com/csi-addons/volume-replication-operator/tree/v0.2.0
- https://github.com/csi-addons/volume-replication-operator/tree/v0.3.0

Signed-off-by: Mathieu Parent <mathieu.parent@insee.fr>
2022-01-26 17:38:53 +01:00
Sébastien Han 287d9a3fbe Merge pull request #9647 from rzarzynski/wip-extra-env-vars-2
osd: allow for injecting extra env. variables via ConfigMap
2022-01-26 17:27:19 +01:00