Commit Graph
2433 Commits
Author SHA1 Message Date
Sébastien Han 2db8288564 Merge pull request #9063 from leseb/fix-9062
mgr: do not set the balancer mode on pacific
2021-10-29 16:52:04 +02:00
Sébastien Han bccc84efa2 mgr: do not set the balancer mode on pacific
On Pacific, Ceph's default is "upmap", so we should let it be
like this.
This lets the user change the mode is desired.
On Octopus though, Rook continues to force the mode to "upmap".

Closes: https://github.com/rook/rook/issues/9062
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-10-29 15:43:29 +02:00
Sébastien Han e0145b9643 nfs: add pool setting CR option
Ths NFS spec now supports the CephBlockPool spec which means that it can
take advantage of all the known settings like compression, size, failure
domain etc.

Closes: https://github.com/rook/rook/issues/9034
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-10-29 09:04:31 +02:00
Sébastien Han 7fbc298498 Merge pull request #9049 from leseb/fix-8683
rgw: add support for updating user caps
2021-10-28 15:07:18 +02:00
Sébastien Han ecd01bb452 Merge pull request #9020 from leseb/fix-8993
rgw: read tls secret hint for insecure tls
2021-10-28 15:07:07 +02:00
Sébastien Han f2cb792e9f rgw: add support for updating user caps
User's capabilities can now be updated from the admin ops API.

Closes: https://github.com/rook/rook/issues/8683
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-10-28 14:17:13 +02:00
Sébastien Han 86c9a8f3de rgw: read tls secret hint for insecure tls
If the admin wants to use insecure TLS to validate connections to rgw
internally, the TLS secret can have another entry "insecureSkipVerify"
and set it to "true".

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-10-28 11:27:00 +02:00
Travis Nielsen 33072bf2a7 Merge pull request #9041 from travisn/cluster-cleanup
core: Treat cluster as not existing if the cleanup policy is set
2021-10-27 14:06:35 -06:00
Travis Nielsen fd10d98dc6 core: treat cluster as not existing if the cleanup policy is set
The cluster CR can be forcefully deleted and cleanup the
cluster resources if the yes-really-destroy-data policy
is set on the CR. In this case, the other controllers should
treat the cluster CR as not existing and allow the finalizers
to be removed on those resources if they are requested for
deletion.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-10-27 10:25:06 -06:00
Sébastien Han 4f2c685ad9 ceph: ability to set label to crash collector
We can now set labels to the crash collector deployment by editing the
CephCluster CR with:

```yaml
spec:
  labels:
    crashcollector:
```

Closes: https://github.com/rook/rook/issues/9039
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-10-27 12:29:50 +02:00
Sébastien Han c54a5556f3 rgw: stop using context.TODO() and use parent ctx
The clusterInfo has the parent Context so let's use it.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-10-27 11:52:52 +02:00
Sébastien Han 3b5bbf28d5 Merge pull request #9003 from leseb/vault-k8s-auth
osd: add support for k8s with vault kms
2021-10-25 18:02:48 +02:00
Blaine Gardner 2f850b6ae6 Merge pull request #8613 from subhamkrai/remove-nautilus
ceph: remove ceph nautilus, ceph octopus to default
2021-10-25 09:09:18 -06:00
Sébastien Han fc9c4b6fc9 Merge pull request #9010 from thotz/rgw-external-endpoint
ceph: update endpoint with IP for external RGW server
2021-10-25 15:49:08 +02:00
Yuichiro Ueno 3fd86f83ae core: add context parameter to opcontroller
This commit adds context parameter to utilities in opcontroller to
remove context.TODO use in opcontroller. By this, we can handle
cancellation of reconcilers in a fine-grained way.

Signed-off-by: Yuichiro Ueno <y1r.ueno@gmail.com>
2021-10-25 20:45:06 +09:00
Jiffin Tony Thottan d4562f6b83 ceph: update endpoint with IP for external RGW server
For external RGW server use the IP mentioned in Gateway for admin Ops
operattions.

Fixes: #8916
Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2021-10-21 19:13:10 +05:30
Sébastien Han 18a4047679 osd: add support for k8s with vault kms
Rook cluster-wide encryption can now use the native Kubernetes
authentication to interact with vault KMS instead of using the token
method.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-10-21 13:59:28 +02:00
Blaine Gardner 063c714c97 Merge pull request #9007 from BlaineEXE/remove-dynamic-clientset
ceph: get rid of dynamic clientset
2021-10-20 09:40:28 -06:00
subhamkrai 0150966024 ceph: remove ceph nautilus, ceph octopus to default
since rook 1.8, ceph nautilus no longer supported,
ceph octopus will be the minimum ceph version.

Closes: https://github.com/rook/rook/issues/7908
Signed-off-by: subhamkrai <srai@redhat.com>
2021-10-20 14:45:12 +05:30
PixelJonas 8733bf6272 ceph: use normal quotation marks for comment
replaces all occurences of lduo/rduo quotation marks to make
sure that using the snippets in a k8s manifest will work

This fixes an issue with ArgoCD not being able
to apply `common.yaml` because of an encoding issue

Signed-off-by: PixelJonas <jonas@janz.digital>
2021-10-20 10:09:22 +02:00
Blaine Gardner 01e2feaef5 ceph: get rid of dynamic clientset
Stop using the dynamic clientset in favor of the controller-runtime
clientset.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-10-19 17:05:38 -06:00
Sébastien Han 4017f94464 osd: use rook binary to fetch key encryption key
When deploying a cluster-wde encrypted cluster we now use the rook
binary to execute some code to fetch the key encryption key.

Using cURL all the time to fetch the key has its limitations. The
incoming integration with Kubernetes Authentication through service
accounts is leading the usage of cURL to its end.
The logic is really complex and prone to errors. Re-implementing the
Go logic into Bash is not a viable option.

Also, using the lib in a binary allows us to keep a consistent behavior
throughout the life cycle of our code.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-10-19 17:29:25 +02:00
Travis Nielsen 12689bd119 ceph: enable mon failover for the arbiter in stretch mode
Prior to ceph v16.2.7 the failover of the arbiter mon was
not supported. Now the new tiebreaker mon can be set during
the failover event and provide more dynamic stability to
the mon quorum if another node is available in the arbiter
zone.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-10-18 08:58:25 -06:00
Blaine Gardner 34a8b42e97 test: try to un-flake multi-cluster-mirror test
Try to un-flake the multi-cluster-mirror test that keeps failing on this
PR.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-10-13 11:06:51 -06:00
Blaine Gardner 65c4972038 rgw: make CephObjectRealm controller idempotent
The CephObjectRealm controller would fail all subsequent reconciles if
the first reconcile created the Kubernetes Secret containing the access
keys for the realm but where the radosgw-admin command failed to create
the realm. This was the only idempotency issue found after reviewing the
CephObjectRealm controller.

Resolves #8954

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-10-13 11:06:51 -06:00
Sébastien Han 5e3ecaadbb Merge pull request #8966 from leseb/rm-compression-mode
ceph: remove default value for pool compression
2021-10-13 18:13:24 +02:00
Sébastien Han 28cc6f5514 ceph: remove default value for pool compression
Using a default value for CompressionMode to none effectively overrides
any values for Parameters. It is deprecated but still takes precedence.
Which means that in its previous form, Parameters was always ignored
since CompressionMode was always set to none when empty.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-10-13 17:06:22 +02:00
Travis Nielsen b4635f8b6b Merge pull request #8965 from Rakshith-R/add-affinity
ceph: add affinity to csi version check job
2021-10-13 07:42:41 -06:00
Sébastien Han 720a96e0cd Merge pull request #8166 from BlaineEXE/tidy-apply-multus
core: clean up ApplyMultus()
2021-10-13 11:58:34 +02:00
Rakshith R c1ef189b91 ceph: apply csi provisioner node-affinity to csi version check job
This commit makes sure csi provisioner node-affinity is applied
to the csi version check job as well, similar to the how
the existing csi provisioner toleration is applied to the job.

Fixes: #8323

Signed-off-by: Rakshith R <rar@redhat.com>
2021-10-13 15:18:23 +05:30
Sébastien Han e33d905b59 Merge pull request #8501 from josephsawaya/ceph-nfs-remove-rados
ceph: remove RADOS options from CephNFS and use .nfs pool
2021-10-13 10:41:49 +02:00
Sébastien Han 58f85e0722 Merge pull request #8959 from renan-campos/issue_8958
ceph: csi controller to use constants to fetch operator configmap
2021-10-13 09:29:34 +02:00
Blaine Gardner a1dd256d4b Merge pull request #8911 from BlaineEXE/rgw-commands-use-staging-flag
rgw: replace period update --commit with function
2021-10-12 08:22:41 -06:00
Renan Campos c4e70933f2 ceph: csi controller to use constants to fetch operator configmap
The CSI controller loop watches ConfigMaps and CephClusters. When a
CephCluster triggers the reconcile loop, the Get call for the ConfigMap
will fail since the name in the request object is that of the
CephCluster. Setting the name and namespace to the constants for the
ConfigMap name and the operator namespace resolves this.

Closes: https://github.com/rook/rook/issues/8958
Signed-off-by: Renan Campos <rcampos@redhat.com>
2021-10-12 09:30:49 -04:00
Blaine Gardner 956430826c rgw: add integration test for committing period
Add to the RGW multisite integration test a verification that the RGW
period is committed on the first reconcile and not committed on the
second reconcile.

Do this in the multisite test so that we verify that this works for
both the primary and secondary multi-site cluster.

To add this test, the github-action-helper.sh script had to be modified
to
1. actually deploy the version of Rook under test
2. adjust how functions are called to not lose the `-e` in a subshell
3. fix wait_for_prepare_pod helper that had a failure in the middle
   of its operation that didn't cause failures in the past

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-10-11 15:24:59 -06:00
Blaine Gardner eadcd757b3 rgw: replace period update --commit with function
Replace calls to 'radosgw-admin period update --commit' with an
idempotent function.

Resolves #8879

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-10-11 14:45:39 -06:00
Travis Nielsen c628edec85 Merge pull request #8939 from leseb/fix-8928
mon: run ceph commands to mon with timeout
2021-10-08 10:00:21 -06:00
Sébastien Han c45fee83c1 Merge pull request #8646 from parth-gr/mon-finalizer
ceph: add finalizers to rook-ceph-mon secrets and configmap
2021-10-08 15:10:31 +02:00
Sébastien Han 8da68bfb78 mon: run ceph commands to mon with timeout
If the mons are not in quorum yet the commands interacting with mon
config store will stale for a very long time.

Closes: https://github.com/rook/rook/issues/8928
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-10-08 11:57:16 +02:00
parth-gr 7c99858a77 ceph: add finalizers to rook-ceph-mon secrets and configmap
Adding finalizers to rook-ceph-mon secrets
and rook-ceph-mon-endpoints configmap
We don't want to delete this resources during disaster
because these details are needed during disaster recovery

Closes: https://github.com/rook/rook/issues/8369
Signed-off-by: parth-gr <paarora@redhat.com>
2021-10-07 19:44:17 +00:00
parth-gr fc7905a7bd ceph: fixing ClientID of log-collector for RGW instance
The Client_ID generated by operator was
different from the log rotate file created
The Clinet_ID= rgwceph.client.rook.ceph.rgw.my.store.a
and log file name= ceph-client.rgw.my.store.a.log
So changed the CLient_ID to ceph-client.rgw.my.store.a for
correct working and this follow the patterns how other modules
Client_ID is generated

Closes: https://github.com/rook/rook/issues/8692
Signed-off-by: parth-gr <paarora@redhat.com>
2021-10-07 19:30:21 +05:30
Sébastien Han c252e42a02 Merge pull request #8923 from Rakshith-R/add-rbdpool-init
ceph: initialize rbd block pool after creation
2021-10-06 17:29:57 +02:00
Rakshith R ab87e1d238 ceph: initialize rbd block pool after creation
This is done in order to prevent deadlock when parallel
PVC create requests are issued on a new uninitialized
rbd block pool due to https://tracker.ceph.com/issues/52537.

Fixes: #8696

Signed-off-by: Rakshith R <rar@redhat.com>
2021-10-06 19:54:51 +05:30
Joseph Sawaya ee791b09fd ceph: update CephNFS to use ".nfs" pool in newer ceph versions
This commit updates the CephNFS CR to make the RADOS settings optional
for Ceph versions above 16.2.7 due to the NFS module changes in Ceph.
The changes in Ceph make it so the RADOS pool is always ".nfs" and the
RADOS namespace is always the name of the NFS cluster.

This commit also handles the changes in Ceph Pacific versions before 16.2.7
where the default pool name is "nfs-ganesha" instead of ".nfs".

Closes: https://github.com/rook/rook/issues/8450
Signed-off-by: Joseph Sawaya <jsawaya@redhat.com>
2021-10-04 17:39:47 +00:00
Blaine Gardner 7586cea049 core: create TRACE_INSECURE log level
Create a new log level for Rook that is hidden from users. This is the
most verbose log level, and it is the level developers would like to use
to get debug logs that are important for debugging but that could leak
senstivie information like credentials in production use.

If a user sets their debug level to "TRACE", they will merely get
"DEBUG" level logs. Only if they set "TRACE_INSECURE" will they get
trace logs, and those are likely to include insecure information. Rook
tries very hard not to leak sensitive information in logs even with
verbose "DEBUG" logs.

Resolves #8778

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-10-01 12:09:19 -06:00
Blaine Gardner e10fb751e5 rgw: add period does not exist debug message
Log as a debug message when the RGW period will be updated because it
does not exist.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-09-29 13:14:52 -06:00
Blaine Gardner 7b9293624a rgw: update period if period does not exist
Rook should update the RGW object store's period if the period doesn't
yet exist. This protects us from the case where the
'radosgw-admin period update --commit` command fails and the
CephObjectStore controller reconciles again.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-09-28 14:17:04 -06:00
Sébastien Han cda5dad291 rgw: use insecure TLS for bucket health check
We have seen cases where the signed certificate used for the RGW does not
contain the internal DNS endpoint, resulting in the health check to fail
since the certificate is not valid for this domain.
People consuming the gateways by external clients and for specific
domains do not necessarily have the internal DNS configured in the
certificate.
So let's be a bit more flexible and simply ensure a connectivity check
and bypass the certificate validation.

Also, this is fixing the tls code in newS3Agent and adds unit tests.

Closes: #8663
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-09-28 14:48:07 +02:00
Blaine Gardner a9ad9135e8 Merge pull request #8806 from leseb/fw-signal-log-collector
ceph: add signal handling for log collector
2021-09-27 12:08:42 -06:00
Sébastien Han 121c2987e3 ceph: stop using tini
We don't need to use tini.
We don't have anything in the rook operator that would
either create zombie processes (no threads) or use
exec (to fork). The Go binary has a really good
signal handling mechanism.

Closes: https://github.com/rook/rook/issues/8794
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-09-27 10:54:16 +02:00