Commit Graph
3165 Commits
Author SHA1 Message Date
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
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
Sébastien Han df2b6faa96 Merge pull request #8995 from leseb/no-error-merge
ceph: only merge stderr on error
2021-10-18 18:28:04 +02:00
Sébastien Han 0e41e36ade ceph: only merge stderr on error
Previously we were merging the stderr even if it was empty, leading to
unmarshall errors.
The error simulation was done here
https://play.golang.org/p/Sk2yw9GUWNu.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-10-18 17:18:57 +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
Sébastien Han 07986bcf8c Merge pull request #8867 from leseb/kv-auto-detect-with-certs
ceph: fix kms auto-detection when full TLS
2021-10-14 11:30:13 +02: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
Blaine Gardner 79c191004e Merge pull request #8971 from leseb/more-output
ceph: print the c-v output when inventory command fails
2021-10-13 10:41:37 -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 61afadd97e ceph: fix kms auto-detection when full TLS
When TLS is used and includes a caert, client key/cert, we need to copy
the content of the secret to a file in the operator's container
filesystem so that we can build the TLS config and thus the HTTP Client,
which reads those files.
Also, removing the files after each API call so they don't persist on
the filesystem forever.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-10-13 18:12:58 +02:00
Sébastien Han 1e9d24ac77 ceph: print the c-v output when inventory command fails
Hopefully, this will give us more hints when a failure occurs.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-10-13 18:08:06 +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
Sébastien Han 0e40d6d9a8 Merge pull request #8889 from parth-gr/logrotate-object
ceph: fixing ClientID of log-collector for RGW instance
2021-10-08 11:41:21 +02:00
Travis Nielsen 2ddf9c9498 Merge pull request #8877 from parth-gr/scc
ceph: modify rook scc in  operator-openshift cr
2021-10-07 13:51:09 -06: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
Sébastien Han 4471f3a92e osd: do not hide errors
The previous exit 32 check for loop device is 5 years old. Also, if the
device cannot be read it will be skipped anyway so let's report the
error and not hide it.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-10-07 17:39:58 +02: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
parth-gr 59467e56ba ceph: modify rook scc in operator-openshift cr
Added allowHostNetwork and allowHostPorts fields
in operator-openshift cr as they are necessary
for validation

Closes: https://github.com/rook/rook/issues/8876
Signed-off-by: parth-gr <paarora@redhat.com>
2021-10-07 18:44:34 +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
Travis Nielsen 87eee8afbc Merge pull request #8924 from leseb/rm-unused-client
core: remove unused clientset
2021-10-06 07:40:52 -06:00
Sébastien Han 0e0ccf8640 Merge pull request #8808 from BlaineEXE/add-trace-log-option
core: create TRACE_INSECURE log level
2021-10-06 11:35:32 +02:00
Sébastien Han 723f144452 core: remove unused clientset
Removing ancient clientset which was not used anywhere any more.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-10-06 11:34:06 +02:00
subhamkrai 6387c7d063 core: close stdoutPipe for the discovery daemon
Closing stdoutPipe for the discovery daemon that
could possibly leaks memory due to unclosed resources.

Closes: https://github.com/rook/rook/issues/8914
Signed-off-by: subhamkrai <srai@redhat.com>
2021-10-05 18:10:59 +00:00
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