Commit Graph
3904 Commits
Author SHA1 Message Date
Travis Nielsen b693a5cca5 core: refactor crash collector for more node daemons
The crash collector controller is designed for watching nodes where
ceph daemons are running, and ensuring a special daemon is running
on that node to provide additional support for ceph on that node.
The crash collector is the first example of a daemon that should be
running on all the ceph daemon nodes. The next example of such a
node daemon will be the ceph exporter that will listen for the
ceph metrics as described in the design doc.
https://github.com/rook/rook/blob/master/design/ceph/ceph-exporter.md

Now the crash collector controller is renamed to the node daemon controller
so the ceph exporter daemon can also be managed by the same controller.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-12-09 16:57:05 -07:00
Travis Nielsen 4a70d3489d osd: replace dot with dash in pvc names
The volume names of a pod must follow the standard naming convention
which does not allow periods in the name. Since the device set name
is used as the pvc name and then the volume name to attach to the osd
prepare job, we must sanitize the name for the invalid character
and replace it.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-12-09 12:43:17 -07:00
Travis Nielsen ca7b148ccc Merge pull request #11024 from thotz/remove-rgw_rados_pool_pg_num_min-quincy
rgw: remove rgw_rados_pool_pg_num_min for metadata pool creation
2022-12-06 07:37:13 -07:00
Jiffin Tony Thottan 5f1b443662 rgw: remove rgw_rados_pool_pg_num_min for metadata pool creation
rgw_rados_pool_pg_num_min is deprecated and no longer valid in qunicy
with https://github.com/ceph/ceph/pull/46234, remove that option from
cephobject-controller as well

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2022-12-06 15:35:24 +05:30
Satoru Takeuchi 0e10d97431 Merge pull request #11331 from travisn/remove-env-vars
core: Remove unnecessary env vars from pod specs
2022-12-06 08:28:06 +09:00
Travis Nielsen 31a8fb1e6a core: set env var for ceph msgr to use random nonce
Ceph will use a random nonce for the msgr daemons as long as
they are running as PID 1 or have the environment variable
CEPH_USE_RANDOM_NONCE set to indicate running in a containerized
environment. While the Ceph daemons in Rook are expected to
run in PID 1, there are some environments where the container
runtime may choose to run something else such as
/usr/bin/pod as PID 1. The side effect then is that ceph uses
the pid as the nonce and causes problems when the daemons
restart with the same PID.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-12-01 16:49:32 -07:00
Rakshith R bde286ef49 osd: re-open encrypted disk during osd-prepare-job if closed
This commit implements this corner case during osd-prepare job.
```
The encrypted block is not opened, this is an extreme corner case
The OSD deployment has been removed manually AND the node rebooted
So we need to re-open the block to re-hydrate the OSDInfo.

Handling this case would mean, writing the encryption key on a
temporary file, then call luksOpen to open the encrypted block and
then call ceph-volume to list against the opened encrypted block.
We don't implement this, yet and return an error.
```
When underlying PVC for osd are CSI provisioned, the encrypted device
is closed when PVC is unmounted due to osd pod being deleted.
Therefore, this may occur more frequently and needs to be handled.
This commit implements the fix for the same.

Signed-off-by: Rakshith R <rar@redhat.com>
2022-11-30 18:54:23 +05:30
Blaine Gardner b5aa9a76b2 Merge pull request #11337 from sp98/parse-debug-logs
core: parse peer pool output with --out-file flag
2022-11-28 09:01:04 -07:00
Santosh Pillai 4f3cd1d030 core: parse peer pool ouput with --out-file flag
When mirror logs are enabled, `ceph osd pool get <poolname> all` command returns peer pool info along
with the debug logs. This causes error while parsing the logs for json
data. Using --out-file flag saves the json data in the file which can be
parsed easily while logging will still be written to stdout/stderr.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2022-11-21 15:28:31 +05:30
ac4b47d71a csi: add a parameter to modify the maxUnavailable value of rbd daemonset
The default value of maxUnavailable of daemonset is 1.
Sometimes the upgrade can be slow due to this setting.
So I add a parameter to change the value for rbd daemonset.

Signed-off-by: Shinya Hayashi <shinya-hayashi@cybozu.co.jp>
Co-authored-by: Toshikuni Fukaya <toshikuni-fukaya@cybozu.co.jp>
Co-authored-by: Yuji Ito <llamerada.jp@gmail.com>
2022-11-21 05:16:15 +00:00
Travis Nielsen 33e824a323 core: remove unnecessary env vars from pod specs
The fsid, username, and user secrets were from legacy and no
longer needed on the osd daemon or mon pods. This removes the
unnecessary env vars from the pod specs.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-11-18 16:39:22 -07:00
Sebastian Hasler 120c7dddcb operator: fix a bug where crash collectors in wrong namespaces were deleted
Fixes #11321

Signed-off-by: Sebastian Hasler <sebastian.hasler@stuvus.uni-stuttgart.de>
2022-11-17 18:12:56 +01:00
Travis Nielsen e0d1cabfda Merge pull request #11278 from parth-gr/resources-discovery
core: Add ability to add resources on discovery DaemonSet
2022-11-10 07:59:23 -07:00
parth-gr 9f432b4ecb core: add ability to add resources on discovery daemon set
Closes: https://github.com/rook/rook/issues/11265

Signed-off-by: parth-gr <paarora@redhat.com>
2022-11-10 17:50:06 +05:30
Travis Nielsen 3a07f3ac98 Merge pull request #10887 from travisn/duplicate-mon-endpoint
mon: Remove out of quorum mons from ceph.conf
2022-11-09 10:16:07 -07:00
Travis Nielsen f1472e16e1 Merge pull request #11268 from cybozu-go/support-loop-device
osd: support loop devices for test clusters
2022-11-09 08:04:21 -07:00
Shinya Hayashi 05875a3f4f osd: support loop devices for test clusters
A new variable is added to rook-ceph-operator-config
ConfigMap to allow using loop devices for osd.

This feature is intended to be used for testing purposes only.

Signed-off-by: Shinya Hayashi <shinya-hayashi@cybozu.co.jp>
2022-11-09 06:45:41 +00:00
Travis Nielsen b6e8ea2b50 mon: remove out of quorum mons from ceph.conf
The mons that are out of quorum may cause ceph commands to timeout
or fail unnecessarily trying to connect to a mon that is no longer
online. Now the mon health check will update the mon endpoints configmap
when a mon is detected out of quorum. This also means that if the
operator is restarted during a mon failover, the failed mon will no
longer remain in the ceph.conf, thus allowing the quorum to be more
likely to respond to the mons that are still in quorum.

The update for mons out of quorum only applies if other mons are in
quorum. If quorum is down, the configmap will not keep track of the offline
mons since too many are offline.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-11-08 11:36:37 -07:00
Avan Thakkar 47df5c37cd core: include userID/userKey to secret generated from CephClient
Adding two new entries(userID/userKey) in the cephClient secret, so that the csi driver can easily consume

Signed-off-by: Avan Thakkar <athakkar@redhat.com>
2022-11-08 15:41:26 +05:30
Blaine Gardner c67c33f1d3 Merge pull request #11202 from BlaineEXE/object-external-enpoint-do-not-use-service
object: do not create service for external object stores
2022-11-07 10:51:33 -07:00
Blaine Gardner a777b1d7d1 object: do not create service for external object stores
External CephObjectStores already have endpoints defined by
spec.gateway.externalRgwEndpoints, and if the external store is
configured with TLS (HTTPS), the store's certificates will likely not
accept connections intended for the Service endpoint Rook creates. Some
users might not be able to easily add the service endpoint to their
certificates. Therefore, don't even bother creating a Service for
external clusters.

This does introduce a few issues. The Service seems to have been
initially created to allow multiple external RGW endpoints to be
addressable via a single address in Rook. For all connections to an
external CephObjectStore with multiple endpoints, simply choose an
endpoint at random. Random selection will prevent Rook from failing to
create buckets or users on an external store if one of the external
store's endpoints fails.

The latest OBC library (lib-bucket-provisioner) allows updating the
endpoints on ObjectBuckets after they are created. This allows Rook
users to change endpoints on external CephObjectStores without breaking
all existing OBCs. It requires implementation of the new GetUserID()
library call, requires updating Provision() and Grant() calls to be
idempotent, and it requires removing the Update() call.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2022-11-04 17:30:30 -06:00
Travis Nielsen 1291885501 mon: use the assimilate mode for setall commands
The monstore has a SetAll method for applying multiple settings
that was applying them individually. Now we use the assimilate
config option to make this more efficient.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-11-03 10:23:10 -06:00
Travis Nielsen 0514547d56 mon: refactor helper to assimilate mon store settings
More settings can use the assimilate command if refactored
to a different go package.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-11-03 09:04:46 -06:00
Travis Nielsen d39258e0d2 Merge pull request #11159 from parth-gr/rotational-disk
osd: add deviceType label to an OSD
2022-11-03 08:55:53 -06:00
Travis Nielsen df6d7af355 security: run the crash collector as ceph user
The crash collector does not have the command line arguments
to run as ceph user id 167, so we set the security context
to run as the ceph user in the main crash collector
container.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-10-27 13:12:21 -06:00
Travis Nielsen 6c7a17a8df Merge pull request #11211 from travisn/mon-host-network
mon: The mon daemons maintain host network settings to allow change in config
2022-10-27 11:34:20 -06:00
Satoru Takeuchi ee0497c444 Merge pull request #11220 from travisn/osd-spec-cleanup
osd: Reduce duplication of arguments
2022-10-27 13:12:28 +09:00
Travis Nielsen faf5eba8dc osd: reduce duplication of arguments
The osd arguments had a few duplicate lines that could be
factored out and thus simplified for code maintainability.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-10-26 16:50:04 -06:00
Travis Nielsen 0ede2946a8 core: remove finalizer from cluster cr last
Removing the finalizers from cluster resources can intermittently fail
in the CI if other updates are made at similar times. The controller
runtime will retry after the failure, but if something external
removes the finalizer on the cephcluster CR, the deletion will not
continue with the removal of finalizers from the other configmap
and secret critical resources.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-10-26 14:17:03 -06:00
Travis Nielsen 61840324be mon: the mon daemons maintain host network settings
If the host network setting is changed in the cluster CR,
the existing mons must continue using the same network
settings or else the operator would update their pod
specs with the incorrect settings and cause mon quorum
to go down. Now the network setting is preserved so
the admin could switch between host and non-host network
configuration without reinstalling.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-10-26 13:40:33 -06:00
Travis Nielsen 0d3d12c0fd Merge pull request #11198 from subhamkrai/latest-ceph-version
core: upgrade ceph to latest release v17.2.5
2022-10-26 09:51:47 -06:00
subhamkrai 270b565f18 core: upgrade ceph to latest release v17.2.5
Signed-off-by: subhamkrai <srai@redhat.com>
2022-10-26 19:59:53 +05:30
Blaine Gardner 0937eaee38 Merge pull request #11124 from BlaineEXE/object-revise-health-check
object: remove health checker
2022-10-24 11:31:23 -06:00
Blaine Gardner 93416fa447 Merge pull request #11183 from BlaineEXE/object-fix-rgw-period-commit-logic
object: fix logic for rgw period commit detection
2022-10-20 09:59:07 -06:00
Madhu Rajanna 729f2a8b32 csi: update csi to latest release
This updates the cephcsi to latest 3.7.2
release and also updates sidecar to the latest
release in some missing files.

Note:- sidecar images are upto date in most of
the places, in some places it was missing, This
PR updates it in missing place.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-10-20 09:16:05 +02:00
Blaine Gardner 5320830781 object: fix logic for rgw period commit detection
The `periodWillChange()` implementation to detect map keys to ignore.
Previously, we relied on the `GoString()` method to output the same
format always to determine the current path to the
map[string]interface{} node, but that may change depending on the underlying
implementation of go-cmp.

Instead, parse the go-cmp `Path` step by step and construct a JSON path
to the node in a stable format.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2022-10-19 14:56:56 -06:00
parth-gr 3bcc29e1ff osd: add deviceType label to an OSD
Closes: https://github.com/rook/rook/issues/11059

Signed-off-by: parth-gr <paarora@redhat.com>
2022-10-19 21:40:43 +05:30
Blaine Gardner a7c0c7ee93 object: remove health checker
Remove the health checker for CephObjectStore. The liveness and
readiness probes go through the same code paths in RGW as creating
buckets without as much affect on the storage backend.

Full discussion: https://github.com/rook/rook/issues/11031

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2022-10-18 13:41:46 -06:00
Madhu Rajanna ffdfeb5bec csi: add setmetadata and clustername flag to omap
The omap generator sidecar is the one who
sets the pvc name and clustername in the metadata
if the pv is re-attached to a new pvc or if the
clustername changes, for that reason we need to
set these flags on the omap generator sidecar
also.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-10-18 15:29:58 +02:00
Travis Nielsen 7f0c83ad18 Merge pull request #10986 from randymtz/increase-liveness-timeout
core: increase liveness probe timeout to 5s
2022-10-17 11:49:18 -06:00
Travis Nielsen 95b84a6c12 Merge pull request #11099 from avanthakkar/fix-configure-rbd-stat-pools
operator: Don't remove existing pools for mgr/prometheus/rbd_stats_pools
2022-10-12 14:20:47 -06:00
Avan Thakkar e8b74207dd operator: don't remove existing pools for mgr/prometheus/rbd_stats_pools
Rook currently knows rbd pools only if they defined through CephBlockPool, so it overrides the config
mgr/prometheus/rbd_stats_pools which may have already been set for pools external to Rook. Check config
before running set command and if there some existing pools append them to enableStatsForCephBlockPools.

Signed-off-by: Avan Thakkar <athakkar@redhat.com>
2022-10-12 20:59:44 +05:30
Travis Nielsen 4c11ba76d7 Merge pull request #10721 from zhucan/bugfix-10712
pool: add timeout to ceph cmd
2022-10-12 08:31:52 -06:00
Blaine Gardner 51fac0a993 nfs: fix nfs grace period when multus is enabled
Run the ganesha-rados-grace command in a remote pod when multus
networking is enabled.

Signed-off-by: parth-gr <paarora@redhat.com>
Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2022-10-05 16:28:36 -06:00
Travis Nielsen f79ff42e0c mgr: set the public dashboard port differently from the target port
If the port is greater than 1024, for backward compatibility the port and
targetPort should be the same value. If the port is less than 1024,
the internal port must use a higher port number. In that case, the internal
port will be the default port numbers and only the public port will be
the desired port in the cluster CR.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-10-05 11:37:37 -06:00
Blaine Gardner 61279e9820 Merge pull request #11018 from thotz/obc-tls-insecurity-flag-skip
rgw: handle insecure flag skip for obc in the tls config
2022-09-30 10:36:42 -06:00
Travis Nielsen 4370d9c710 Merge pull request #11085 from humblec/sidecar-update
update sidecars to latest in CSI deployment
2022-09-29 08:46:30 -06:00
Humble Chirammal b9fb023edf csi: explicitly set default fstype for attacher sidecar
With the attacher sidecar update to v4.0.0 this has to be set
explictly.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-09-29 19:35:24 +05:30
Humble Chirammal c847e6b98d csi: update sidecars to latest in CSI deployment
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-09-29 19:35:17 +05:30
Humble Chirammal 4d435b224f csi: use ceph csi v3.7.1 for rook csi driver deployment
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-09-29 16:46:43 +05:30