Commit Graph
3904 Commits
Author SHA1 Message Date
parth-gr a84daf9bf0 core: change io/ioutil package to use io and os package
few functions got change as they were deprecated
for ex: ioutil.Readfile change to os.Readfile
ioutil.TempFile change to os.CreateTemp
And fixed golang-ci-lint-issues

Signed-off-by: parth-gr <paarora@redhat.com>
2023-02-17 20:38:29 +05:30
Travis Nielsen 0a80789367 Merge pull request #11690 from rkachach/fix_issue_11685
ci: fix MultiClusterDeploySuite CI
2023-02-16 11:19:04 -07:00
Redouane Kachach b464428978 ci: fix MultiClusterDeploySuite CI
This fixes the the MultiClusterDeploySuite CI failure. The operator
is timing out waiting for the mgr deployments to be
ready, according to the WaitForDeploymentToStart() method. After
the reconcile times out after about five minutes, the next
reconcile succeeds since the wait is only done for new mgr
deployments.

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

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
2023-02-16 18:43:38 +01:00
Rakshith R 8b9ded1f77 csi: add option to enable read affinity for rbd volumes
This commit adds code to supply variables required
to enable read affinity for rbd volumes.
It leverages `read_from_replica=localize,crush_locations=key:value`
krbd map option from ceph to serve reads from the most local OSD.
refer:
https://docs.ceph.com/en/latest/man/8/rbd/#kernel-rbd-krbd-options

Signed-off-by: Rakshith R <rar@redhat.com>
2023-02-16 19:09:39 +05:30
Travis Nielsen 06eb431525 Merge pull request #11674 from travisn/osd-version-label
osd: Ensure rook version label is not set on pod
2023-02-15 12:21:09 -07:00
Travis Nielsen ace2e152e8 Merge pull request #11673 from travisn/rgw-pool-pgs
object: RGW metadata pg count reduction on 16.2.11
2023-02-15 12:20:23 -07:00
Travis Nielsen 3dabc6dcb6 Merge pull request #11317 from avanthakkar/introduce-ceph-exporter
core: introduce ceph-exporter
2023-02-15 11:59:05 -07:00
Travis Nielsen b9be333651 Merge pull request #11678 from Madhu-1/fix-v2-map
core: set rbd default map options
2023-02-15 11:49:04 -07:00
Travis Nielsen b008c5753f Merge pull request #11643 from rkachach/fix_issue_11640
mgr: use k8s readiness probe to implement mgr HA
2023-02-15 09:51:48 -07:00
Blaine Gardner 2733375ca4 object: make OBC genUserID unique across clusters
Rook's implementation of OBC's GenerateUserID could generate colliding
user IDs for multisite clusters where each site is configured with the
same namespace/name of CephObjectStore. Add the Ceph cluster FSID to the
generated name to ensure the names won't conflict for multiple sites.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2023-02-15 09:08:52 -07:00
Madhu Rajanna 0ab6c34bf2 core: set rbd default map options
Set the rbd map default option to ms_mode=prefer_crc
when v2 ports are used and encryption is disabled.
If we dont pass/set the ms_mode in the map options
the kernel client will assume its using v1 ports
and map operation will fail.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2023-02-15 12:46:40 +01:00
Avan Thakkar 460900756c core: add service monitor for ceph-exporter service
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
2023-02-15 15:44:56 +05:30
Redouane Kachach dc76f81fea mgr: use k8s readiness probe to implement mgr HA
The idea behind this change is to use the readiness probe to implement
the mgr HA mechanism. In the current ceph mgr implementation only the
active instance offers the command 'mgr_status' through the admin
socket. We use this command combined with a Readiness Exec Probe to
detect which manager is active. Kubernetes will automatically mark
it as ready and redirect any service traffic to the active instance.

Closes: https://github.com/rook/rook/issues/11640
Closes: https://github.com/rook/rook/issues/11638
Signed-off-by: Redouane Kachach <rkachach@redhat.com>
2023-02-15 10:12:16 +01:00
Travis Nielsen 107d947f97 object: rgw metadata pg count reduction on latest pacific
The removal of the rgw_rados_pool_pg_num_min property
was completed in v16.2.11 for Pacific. The previous
fix in PR 11024 only assumed the fix was in Quincy v17.2.2
or newer. Now we account for v16.2.11 as well.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2023-02-14 16:25:31 -07:00
Travis Nielsen 1ba93b4047 osd: ensure rook version label is not set on pod
The rook-version tag must not be set on the pod spec labels
since it will result in the ceph daemons being restarted every
time there is a rook version update, even if the ceph version
or pod spec was not otherwise updated.

The rook-version tag was being added to the OSD pod spec
due to a shared pointer to the labels. The code intended
to only add the version label to the deployment labels,
but since the pod labels shared the map variable, the
pod unintentionally also had the version label added.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2023-02-14 16:10:53 -07:00
Travis Nielsen 47d7c06bdc core: remove dead code for rook version labels
The RookVersionLabelMatchesCurrent() method is no longer
used, so remove it.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2023-02-14 15:56:40 -07:00
Travis Nielsen 2e89649b3a Merge pull request #11594 from subhamkrai/update-rbd-mirror-log-size
rbdmirror: set log rotation from 7 to 4x i.e 28
2023-02-14 07:51:05 -07:00
subhamkrai 036715c3b2 rbdmirror: set log rotation from 7 to 4x i.e 28
increasing the rotation from default 7 to 28 as
in case of rbdmirror logs seems not enough in some cases
with maxLogSize 500 so it's better to increase the rotation
for rbdmirror specific.

Signed-off-by: subhamkrai <srai@redhat.com>
2023-02-13 21:37:57 +05:30
Travis Nielsen 5e0cf95228 Merge pull request #11627 from travisn/require-msgrv2
core: Option to require msgrv2 even without encryption
2023-02-10 10:58:22 -07:00
Travis Nielsen 3ea8f15912 Merge pull request #11630 from microyahoo/fix_11629
rgw: handle insecure flag skip for object bucket notification in the tls config
2023-02-10 09:57:09 -07:00
Travis Nielsen e7320ad63b mon: allow mons on msgr1 even if v2 settings required
Mons that are configured on msgr1 will be using the v1 port
in the csi driver since only one port is allowed in the configmap.
To allow mons to be started on v2 while keeping quorum with the
v1 mons, the v1 mons must continue running on the v1 port.
So even if msgr2 is required, allow existing v1 mons to continue
running on that port.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2023-02-10 09:38:09 -07:00
Travis Nielsen d53b7fcbbd Merge pull request #11616 from travisn/override-cm-labels
helm: Add labels and annotations to config overrides configmap
2023-02-10 08:11:41 -07:00
Travis Nielsen ab3209c140 helm: add labels and annotations to config overrides configmap
The default configmap does not have any labels or annotations
applied. If the helm chart is later updated to configure the
ceph config overrides, the configmap will fail to be created
by the chart since it doesn't have the needed label and helm
annotations so helm will know it can take over the resource
management.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2023-02-10 07:33:35 -07:00
Madhu Rajanna d7dc12d834 csi: provide way to set cephfs kernel mount options
Exposing CSI configuration for the user to
set the cephfs kernel mount options.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2023-02-10 08:26:41 +01:00
Liang Zheng c0c4c30334 rgw: handle insecure flag skip for object bucket notification in the tls config
Signed-off-by: Liang Zheng <zhengliang0901@gmail.com>
2023-02-07 17:35:55 +08:00
subhamkrai a1a127f6ba mds: support mds with multus
to support mds with multus, we don't need
to add `--public-adr`, if multus is selected as
the network in cephCluster CR.

Signed-off-by: subhamkrai <srai@redhat.com>
2023-02-07 10:33:09 +05:30
Avan Thakkar 2f8ee60374 core: introduce ceph-exporter
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
2023-02-06 02:47:09 -05:00
subhamkrai 30f21e4e7f operator: fix webhook loggin during deletion
Signed-off-by: subhamkrai <srai@redhat.com>
2023-01-30 13:41:27 +05:30
Travis Nielsen c5c91d79e3 Merge pull request #11453 from aruniiird/fix-cephFS-status
Fix CephFS Status updates
2023-01-24 07:57:24 -07:00
Arun Kumar Mohan 7e87c67536 core: fix CephFS status updates
CephFS object fails to do a initial status update.
Operator shows the following error message in logs,

'Error while updation: Operation cannot be fulfilled on
cephfilesystems.ceph.rook.io "myfs": the object has been
modified; please apply your changes to the latest version
and try again'

Function 'updateStatus' now returns the new/updated
CephFilesystem object if successfully updated or nil.

Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
2023-01-24 19:06:55 +05:30
Rakshith R 12fd87f40b csi: add default version to images if it is missing
Rook will now append internal default versions to custom
csi image variables passed down if version is missing in
them.
This will enable users using their private registries to
just pass different image names while rook takes care
of adding default versions to them.

Resolves: #10529

Signed-off-by: Rakshith R <rar@redhat.com>
2023-01-24 14:54:05 +05:30
Travis Nielsen 4d15c10e90 Merge pull request #11554 from Madhu-1/fix-11541
core: unset messenger2 configuration
2023-01-18 08:51:15 -07:00
Madhu Rajanna 436a87ea13 csi: fix custom ceph.conf for csi pods
we need to set the variable in the template
instead of the global variable for the
template rendering.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2023-01-18 11:33:02 +01:00
Madhu Rajanna d1a86f6a63 core: unset messenger2 configuration
Unset encryption configuration and default
rbd map option when the encryption is not
enabled or it disabled after sometime.

Unset compression option also when the compression
is disabled.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2023-01-18 11:05:42 +01:00
Jiffin Tony Thottan c4984208e8 test: update kv version for rgw-kms tests
The test is getting time out while checking backend version for kv
engines in RGW KMS unit tests.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2023-01-16 19:14:37 +05:30
subhamkrai e9e2313126 webhook: disable webhook by default
sadly, we need to disable webhook by default until
we find solution to https://github.com/rook/rook/issues/10719

Signed-off-by: subhamkrai <srai@redhat.com>
2023-01-12 22:08:56 +05:30
Madhu Rajanna bc41df4dd8 core: set rbd_default_map_options for encryption
Set rbd_default_map_options to secure when encryption
is enabled or else set it to prefer-crc.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2023-01-12 10:02:15 +01:00
Madhu Rajanna f11e65f40c csi: update sidecars to latest release
update all the kubernetes sidecars to the latest
release.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2023-01-06 09:42:36 +01:00
Travis Nielsen aa2c31f154 Merge pull request #11493 from parth-gr/external-errors
external: Dont call telemetry if the cluster is external
2023-01-03 10:14:50 -07:00
Yuma Ogami 7599f1bc6b osd: add expand-bluefs init container for host-based cluster
OSD is not resized in host-based clusters even though expanding
the backing block device. It's due to the lack of bluefs-bdev-expand
init container.

Closes: https://github.com/rook/rook/issues/10930
Signed-off-by: Yuma Ogami <yuma-ogami@cybozu.co.jp>
2023-01-03 05:03:03 +00:00
parth-gr a52e2f1794 external: dont call telemetry if the cluster is external
closes: https://github.com/rook/rook/issues/11470
Signed-off-by: parth-gr <paarora@redhat.com>
2023-01-02 20:41:40 +05:30
Yuma Ogami c6c264df84 osd: add unit test for chown-container-data-dir init container
Signed-off-by: Yuma Ogami <yuma-ogami@cybozu.co.jp>
2022-12-22 07:43:15 +00:00
Blaine Gardner 50c1eeaeb0 Merge pull request #11374 from BlaineEXE/rgw-probe-update
object: update startup, liveness, readiness probes
2022-12-20 16:15:53 -07:00
Blaine Gardner 17c5cf7384 object: update startup, liveness, readiness probes
Based on the latest info from the Ceph RGW team, update all probes. Get
rid of the liveness probe entirely. Update startup and readiness probes
to support return codes for misconfiguration (500) and for server-side
throttling (498 or 503).

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2022-12-20 15:23:22 -07:00
Travis Nielsen 25ac236b5c core: remove support for machine disruption budgets
The machine disruption budgets for handling openshift
machines and machinesets are now removed since they
have been unused and unmaintained since implemented.
This feature is expected to be handled with the more
common Pod Disruption Budgets. A workaround is for the
cluster admin to set up their machine sets so they
match the zone topology. See the original design
doc from the feature here:
https://github.com/rook/rook/blob/master/design/ceph/ceph-openshift-fencing-mitigation.md

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-12-16 11:15:12 -07:00
subhamkrai de604d3689 operator: adding logs for debugging
Signed-off-by: subhamkrai <srai@redhat.com>
2022-12-16 08:46:44 +05:30
Travis Nielsen 3a8c7d2422 Merge pull request #11434 from travisn/secret-as-file
core: Read mon secret from file instead of env var
2022-12-15 10:19:09 -07:00
subhamkrai 159fe3ae6f operator: disable webhook by default
disable webhook in downstream cluster.

Signed-off-by: subhamkrai <srai@redhat.com>
2022-12-15 21:08:42 +05:30
Travis Nielsen 403335177a core: read mon secret from file instead of env var
Environment variables are not recommended for secrets in pods since
they can be easily leaked if the environemnt variables are logged.
By mounting the mon secret as a file, the mgr and osd prepare pods
can read the mon secret from a file for better security.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-12-14 16:24:44 -07:00
Travis Nielsen e90f7ce022 Merge pull request #11414 from travisn/sanitize-deviceset-name
osd: Replace dot with dash in storageClassDeviceSet names since used as volume names
2022-12-12 09:57:14 -07:00