Commit Graph
2344 Commits
Author SHA1 Message Date
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
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
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
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
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
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 cb10fe35fa 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>
(cherry picked from commit a777b1d7d1)

# Conflicts:
#	pkg/apis/ceph.rook.io/v1/types.go
2022-11-07 14:30:58 -07:00
Travis Nielsen d56d722fe4 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>
(cherry picked from commit 1291885501)
2022-11-04 16:57:13 +00:00
Travis Nielsen 4e0e3f62fc 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>
(cherry picked from commit 0514547d56)
2022-11-04 16:57:13 +00:00
parth-gr 36981a161e osd: add deviceType label to an OSD
Closes: https://github.com/rook/rook/issues/11059

Signed-off-by: parth-gr <paarora@redhat.com>
(cherry picked from commit 3bcc29e1ff)
2022-11-03 14:56:36 +00:00
Travis Nielsen fd397caf77 Merge pull request #11144 from rook/mergify/bp/release-1.10/pr-10721
pool: add timeout to ceph cmd (backport #10721)
2022-10-31 13:25:45 -06:00
Travis Nielsen ec226e6c68 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>
(cherry picked from commit df6d7af355)
2022-10-31 17:14:39 +00:00
Travis Nielsen a809631456 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>
(cherry picked from commit 61840324be)
2022-10-27 17:34:59 +00:00
Travis Nielsen d73e4f90e8 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>
(cherry picked from commit 0ede2946a8)
2022-10-26 21:15:26 +00:00
subhamkrai 98600a440f core: upgrade ceph to latest release v17.2.5
Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 270b565f18)
2022-10-26 15:52:18 +00:00
Blaine Gardner e0806d57bb 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>
(cherry picked from commit 5320830781)
2022-10-20 15:59:44 +00:00
Madhu Rajanna 7e8e8e2ea1 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>
(cherry picked from commit 729f2a8b32)
2022-10-20 14:05:23 +00:00
Madhu Rajanna 78eb665282 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>
(cherry picked from commit ffdfeb5bec)
2022-10-18 15:10:41 +00:00
Randy J. Martinez b187539e13 core: increase liveness probe timeout to 5s
stability issues have been observed with 1s.
socket latency is expected whenever CPUs are
under minor pressure. Increasing value to
5s should cover most small-medium scale envs.

Resolves BZ: 2126566

Signed-off-by: Randy J. Martinez <randy@cephtips.com>
(cherry picked from commit ac9df66b76)
2022-10-17 17:49:54 +00:00
Avan Thakkar 993942b891 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>
(cherry picked from commit e8b74207dd)
2022-10-12 20:21:09 +00:00