Commit Graph
3690 Commits
Author SHA1 Message Date
Liang Zheng 695939dffd object: update os user caps
Removing user caps will be skipped as the UserCaps is empty, which will cause updating user caps to not take effect.

Signed-off-by: Liang Zheng <zhengliang0901@gmail.com>
(cherry picked from commit c81aa7f856)
2023-02-22 07:17:48 -07:00
mergify[bot] 7c718a88f3 Merge pull request #11683 from rook/mergify/bp/release-1.10/pr-11673
object: RGW metadata pg count reduction on 16.2.11 (backport #11673)
2023-02-15 19:56:32 +00:00
Travis Nielsen 2d73ca4ff2 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>
(cherry picked from commit 1ba93b4047)
2023-02-15 19:21:53 +00:00
Travis Nielsen f3b00dce6f 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>
(cherry picked from commit 47d7c06bdc)
2023-02-15 19:21:53 +00:00
Travis Nielsen 79a7dfe1e1 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>
(cherry picked from commit 107d947f97)
2023-02-15 19:21:09 +00:00
subhamkrai fd2568f826 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>
(cherry picked from commit 036715c3b2)
2023-02-14 14:51:48 +00:00
Liang Zheng 217752d81c rgw: handle insecure flag skip for object bucket notification in the tls config
Signed-off-by: Liang Zheng <zhengliang0901@gmail.com>
(cherry picked from commit c0c4c30334)
2023-02-10 16:58:09 +00:00
Travis Nielsen 08d3c9cfb4 Merge pull request #11605 from rook/mergify/bp/release-1.10/pr-11593
operator: fix webhook logging during deletion (backport #11593)
2023-02-10 09:58:05 -07:00
Travis Nielsen e565fb3ff6 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>
(cherry picked from commit ab3209c140)
2023-02-10 15:12:31 +00:00
subhamkrai 935d3bfaed 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>
(cherry picked from commit a1a127f6ba)
2023-02-08 15:37:39 +00:00
subhamkrai bda24bbc77 operator: fix webhook loggin during deletion
Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 30f21e4e7f)
2023-02-01 22:45:33 +00:00
mergify[bot] 34498e0cfc Merge pull request #11582 from rook/mergify/bp/release-1.10/pr-11453
Fix CephFS Status updates (backport #11453)
2023-02-01 08:37:03 +00:00
Arun Kumar Mohan b9056d49ef 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>
(cherry picked from commit 7e87c67536)
2023-01-24 14:57:55 +00:00
Rakshith R 4dac8a2ce4 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>
(cherry picked from commit 12fd87f40b)
2023-01-24 14:52:48 +00:00
Madhu Rajanna 8593a5398d 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>
(cherry picked from commit d1a86f6a63)
2023-01-18 15:52:14 +00:00
Madhu Rajanna 14fd3fbc83 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>
(cherry picked from commit 436a87ea13)
2023-01-18 14:32:26 +00:00
Jiffin Tony Thottan 8d8b03d189 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>
(cherry picked from commit c4984208e8)
2023-01-17 20:32:59 +00:00
subhamkrai c861c73219 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>
(cherry picked from commit e9e2313126)
2023-01-12 18:18:24 +00:00
Madhu Rajanna d119592974 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>
(cherry picked from commit bc41df4dd8)
2023-01-12 14:35:35 +00:00
Madhu Rajanna 71eb14afb2 csi: update sidecars to latest release
update all the kubernetes sidecars to the latest
release.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit f11e65f40c)
2023-01-06 07:59:29 -07:00
parth-gr e8708ed8f8 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>
(cherry picked from commit a52e2f1794)
2023-01-03 17:15:15 +00:00
Yuma Ogami 304734cf7d 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>
(cherry picked from commit 7599f1bc6b)
2023-01-03 06:36:10 +00:00
Yuma Ogami a9a8517086 osd: add unit test for chown-container-data-dir init container
Signed-off-by: Yuma Ogami <yuma-ogami@cybozu.co.jp>
(cherry picked from commit c6c264df84)
2023-01-03 06:36:09 +00:00
subhamkrai 544219d3de operator: adding logs for debugging
Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit de604d3689)
2022-12-16 05:19:53 +00:00
Travis Nielsen 671210eeab 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>
(cherry picked from commit 2a16cd857c)
2022-12-16 02:16:14 +00:00
Travis Nielsen db4a16fd10 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>
(cherry picked from commit 9975e09406)
2022-12-16 02:16:14 +00:00
mergify[bot] 553379f91f Merge pull request #11445 from rook/mergify/bp/release-1.10/pr-11301
OSD prepare job cannot create vols with /dev/mapper alias on PVCs (backport #11301)
2022-12-16 00:43:25 +00:00
mergify[bot] 1ea6cde404 Merge pull request #11426 from rook/mergify/bp/release-1.10/pr-11414
osd: Replace dot with dash in storageClassDeviceSet names since used as volume names (backport #11414)
2022-12-16 00:17:30 +00:00
Travis Nielsen 0c27d65f81 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>
(cherry picked from commit 403335177a)
2022-12-15 11:06:06 -07:00
Travis Nielsen 89aa70996b 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>
(cherry picked from commit 33e824a323)
2022-12-15 17:28:22 +00:00
ausias-armesto 9ed945156e 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>
(cherry picked from commit f55c4573cf)
2022-12-15 17:06:21 +00:00
subhamkrai 70f4447575 operator: disable webhook by default
disable webhook in downstream cluster.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 159fe3ae6f)
2022-12-15 16:26:25 +00:00
Travis Nielsen 32ae0529d2 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>
(cherry picked from commit 4a70d3489d)
2022-12-12 16:57:56 +00:00
Travis Nielsen 080c7a0049 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>
(cherry picked from commit 8a94bb20ae)
2022-12-12 09:13:59 +00:00
Rakshith R 69d628ce9b 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>
(cherry picked from commit 24fa9ed935)
2022-12-08 18:26:46 +00:00
Jiffin Tony Thottan da9a5d7553 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>
(cherry picked from commit 5f1b443662)
2022-12-06 14:37:43 +00:00
Travis Nielsen d0dc21efd9 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>
(cherry picked from commit 31a8fb1e6a)
2022-12-02 04:13:20 +00:00
Rakshith R 61a38020a7 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>
(cherry picked from commit bde286ef49)
2022-12-01 16:08:22 +00:00
Satoru Takeuchi db2d875fe7 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>
(cherry picked from commit 36f8074938)
2022-11-29 02:19:41 +00:00
Santosh Pillai f80f53e51b 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>
(cherry picked from commit 4f3cd1d030)
2022-11-28 16:02:38 +00:00
Shinya Hayashi c424b3c42e 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>
(cherry picked from commit ac4b47d71a)

# Conflicts:
#	Documentation/Helm-Charts/operator-chart.md
2022-11-24 10:53:08 +00:00
Sebastian Hasler 1835ee4802 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>
(cherry picked from commit 120c7dddcb)
2022-11-17 18:43:31 +00:00
Travis Nielsen e566124b2c Merge pull request #11285 from rook/mergify/bp/release-1.10/pr-11280
core: include userID/userKey to secret generated from CephClient (backport #11280)
2022-11-11 14:53:44 -07:00
Travis Nielsen a52a8820a5 Merge pull request #11288 from rook/mergify/bp/release-1.10/pr-10887
mon: Remove out of quorum mons from ceph.conf (backport #10887)
2022-11-11 14:53:20 -07:00
Nitin Goyal 86b09e8058 object: mark endpoint as a optional field
Signed-off-by: Nitin Goyal <nigoyal@redhat.com>
2022-11-11 16:32:30 +05:30
Shinya Hayashi 13b63c4a08 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>
(cherry picked from commit 05875a3f4f)
2022-11-10 18:31:43 +00:00
parth-gr 063196d344 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>
(cherry picked from commit 9f432b4ecb)
2022-11-10 15:00:19 +00:00
Travis Nielsen 96aef8a1ae 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>
(cherry picked from commit b6e8ea2b50)
2022-11-09 17:16:46 +00:00
Avan Thakkar afb58cfb5e 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>
(cherry picked from commit 47df5c37cd)
2022-11-09 14:27:36 +00:00
Blaine Gardner ecb0a92577 object: allow new status endpoints to be null
For the upgrade case, allow the status endpoints to have null slices.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2022-11-08 13:33:31 -07:00