Commit Graph
3723 Commits
Author SHA1 Message Date
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
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
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
Travis Nielsen 03bfd5e7cd Merge pull request #11301 from ausias-armesto/fix/11297-create-volumes-with-mapper-alias
OSD prepare job cannot create vols with /dev/mapper alias on PVCs
2022-12-15 10:05:42 -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
ausias-armesto f55c4573cf osd: cannot create volumes on pvc based osd with alias dev mapper
It removes the condition that select the devices name prefixed with /dev/mapper as it is causing the ceph-volume command to fail.

Closes: #11301
Signed-off-by: ausias-armesto <ausiasarmesto@gmail.com>
2022-12-15 16:04:29 +01:00
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
Travis Nielsen d532e27c6c Merge pull request #11399 from travisn/osd-purge-config
core: Allow ceph.conf to be updated if already exists
2022-12-12 07:53:22 -07:00
Satoru Takeuchi 399b369c97 Merge pull request #11413 from travisn/mpath_filesystem
osd: Allow mpath_member filesystem for mpath disks
2022-12-12 18:13:22 +09:00
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 8a94bb20ae osd: allow mpath_member filesystem for mpath disks
Multipath devices may have an FSTYPE=mpath_member even though
a valid device for creating an OSD. The device will be allowed
in this case when creating the OSD on a PV since it is a device
specifically provisioned for the OSD.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-12-09 09:42:27 -07:00
Rakshith R 24fa9ed935 osd: remove stale dm device during osd-prepare-job
During osd-prepare-job,

The encrypted device is found to be closed in some cases when
the OSD deployment has been removed manually accompanied
by any of following cases:
- node reboot
- csi managed PVC being unmounted etc

while re-opening the block to re-hydrate the OSDInfo,
the dm device `<pvc-name>-block-dmcrypt` clashes with
the one used by OSD pod which is stale by now.
This commit adds cmd to remove this stale dm device.
Error with output "No such device" is ignored.

Signed-off-by: Rakshith R <rar@redhat.com>
2022-12-08 15:57:56 +05:30
Travis Nielsen 2a16cd857c osd: improve error message for osd purge
The OSD purge was printing an incorrect sentence, so this now
fixes the grammar.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-12-07 14:34:01 -07:00
Travis Nielsen 9975e09406 core: allow ceph.conf to be updated if already exist
The ceph.conf was being written with 0x444 permissions, which means
the file could not be updated if it already exists. Specifically, when
an osd is purged, if the operation is retried multiple times, only
the first operation was succeeding. The subsequent requests to purge
an osd were failing due to the config already existing. If we make
the config writeable with 0x644 then the operator can always write the file.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-12-07 14:33:36 -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
Satoru Takeuchi 36f8074938 osd: improve log on specifying lv and loop device as osd
We can use LVM logical volumes and loop devices as OSD iff we specify
them in the `devices` field. If we use filters like `deviceFilter`,
these devices are not picked with a log message which let users
to specify the exact device name. It's better to mention which field
users should use in this case.

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

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2022-11-28 23:18:54 +00:00
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