Commit Graph
2766 Commits
Author SHA1 Message Date
Madhu Rajanna 2dae7f6778 csi: set daemonset set name as template name
Currently daemonset template.metadata.name is
empty and the way we are setting is not correct
use the daemonset name as the template.metadata.name

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-09-02 11:30:41 +05:30
Travis Nielsen b6ccbffc11 Merge pull request #10804 from zhucan/bugfix-10743
object: gateway.port partially ignored when hostNetwork disabled
2022-08-31 09:27:00 -06:00
Travis Nielsen 3f4f3269d0 Merge pull request #10840 from humblec/sidecar
csi: use the latest sidecars for ceph csi driver
2022-08-31 09:15:26 -06:00
Travis Nielsen edc4a9b3b3 Merge pull request #10827 from Abirdcfly/master
csi: remove duplicate word in comments
2022-08-31 07:33:43 -06:00
Humble Chirammal 6ef366dc34 csi: use the latest sidecars for ceph csi driver
at present, the csi sidecars are older versions and not in parity
with the latest ceph csi release v3.7.0. This commit update the
same to make it.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-08-31 14:43:00 +05:30
Abirdcfly 7224bb8499 csi: remove duplicate word in comments
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-08-31 14:09:26 +08:00
zhucan b94f080548 object: gateway.port partially ignored when hostNetwork disabled
Signed-off-by: zhucan <zhucan.k8s@gmail.com>
2022-08-31 10:19:22 +08:00
Travis Nielsen a6dfb77827 build: update min version to k8s 1.19
Rook will support the most recent seven K8s releases,
so we update the min version to 1.19 for Rook v1.10.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-08-30 15:15:20 -06:00
Travis Nielsen 055c22f4c4 rbdmirror: rotate logs for rbd mirroring
The rbd mirror daemon logs to two files, one for the
lodal mirror daemon and one log from the other cluster
where the mirroring is taking place. The log rotation
was only rotating one of the logs. Now we make the
log rotation more general to catch all of the rbd mirror
logs from different clusters.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-08-29 14:45:44 -06:00
Travis Nielsen 538025111a core: only log errors with v1beta1 cron job
v1beta1 cron jobs have not been created by rook since k8s 1.21
and now are fully removed in 1.25. As long as we still support
older than 1.21 we still need to attempt to delete the v1beta1
cron jobs in case they had been created before an upgrade.
If the deletion fails, now we just log a debug statement since
it is a normal condition, and continue with the v1 cron job
creation.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-08-29 13:31:24 -06:00
Satoru Takeuchi b68bef7522 Merge pull request #10717 from travisn/mon-failover-error
mon: Improve mon failover reliability to better handle failure and topology
2022-08-24 17:26:57 +09:00
Madhu Rajanna 6a650e1c9d csi: make cephcsi 3.6.0 as minimum supported version
Setting the min version to 3.7 will make upgrade
difficult. If someone is using any different/custom
version, this means they won't be able to upgrade to
rook v1.10 unless they also update their csi image
at the same time. If we set the min version to 3.6,
it will give some time buffer to allow them to
change the csi driver later.

ref: https://github.com/rook/rook/pull/10759#discussion_r953014295

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-08-24 08:48:09 +05:30
Travis Nielsen 72a4245fbf mon: improve mon failover reliability
Mon failover reliability is improved in two scenarios with these changes.
First, if the failover is aborted because of failing to start the new mon
and wait for it to join quorum, the new mon will be fully removed and
the failover rolled back. Previously, the operator would leave the new
mon pod running even if it never joined quorum. Now the timeout for the failover
is increased to wait longer for the new mon, but if it times out, there
are no leftovers from the cancelled failover.

Second, if the operator is failed in the middle of a failover
before the old mon is removed, the operator needs to remove an extra
mon. The operator was only selecting a random mon for removal instead
of honoring the stretch cluster topology or looking for mons
on the same node that could be removed to restore the correct
desired number of mons.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-08-23 19:52:41 -06:00
Travis Nielsen cc15c94e6c Merge pull request #10736 from pkalever/clusterName-metadata
CSI: provide a way to supply `--setmetadata` and `--clustername` to the csi driver
2022-08-23 13:06:27 -06:00
Travis Nielsen f02ffef8da Merge pull request #10503 from humblec/cephfs-file-policy
csi: change the fsgrouppolicy for CephFS driver to "File" mode
2022-08-23 13:00:50 -06:00
Prasanna Kumar Kalever e376c17bfb csi: provide a way to set --clustername at csi driver
One can now use the operator configmap for CSI_CLUSTER_NAME variable
for setting ClusterName on the RBD images and CephFS subvolume.
This will be useful in cases like for example, when two container orchestrator
clusters (Kubernetes/OCP) are using a single ceph cluster.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2022-08-23 12:12:02 +05:30
Prasanna Kumar Kalever b5b8cbf6ae csi: provide a way to enable --setmetadata at csi driver
One can now tweak the operator configmap for CSI_ENABLE_METADATA boolean to
enable/disable setting of PV/PVC/PVCNamespace &
snapshot-name/snapshot-namespace/snapshotcontent-name on the RBD images
and CephFS subvolume.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2022-08-23 12:11:02 +05:30
Travis Nielsen 73e0a864ce Merge pull request #10759 from Madhu-1/update-csi-v3.7.0
csi: update cephcsi to v3.7.0 release
2022-08-22 22:29:27 -06:00
Travis Nielsen e44eb7d0e7 Merge pull request #10751 from subhamkrai/fix-log-collector
core: fix logrotate bash check and periodicity logic
2022-08-22 21:23:59 -06:00
Madhu Rajanna 52d410a99b csi: update cephcsi to v3.7.0 release
As cephcsi v3.7.0 is released updating
CephCSI to v3.7.0 in Rook and defaulting
the minimum version to v3.7.0

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-08-23 07:53:35 +05:30
subhamkrai 9d4d5bc702 core: fix logrotate bash check and periodicity logic
we need use `!=` for string comparision in bash instead of
`-ne`. Also, need to correct periodicity if condition to
make it work as expected.

Signed-off-by: subhamkrai <srai@redhat.com>
2022-08-22 17:14:51 +05:30
zhucan 2011d9104d object: hostNetwork setting should be under spec.gateway instead of spec in the ObjectStore CRD
Signed-off-by: zhucan <zhucan.k8s@gmail.com>
2022-08-22 14:47:10 +08:00
Blaine Gardner 5b0a22ca46 ci: update codespell config
Codespell had its first release in a year yesterday and added some
dictionary rules that are now being flagged in our code. Only one
issue required changes to our code, so modify the codespell config to
allow the words we want to allow.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2022-08-18 09:07:52 -06:00
Travis Nielsen d7267ff9d2 Merge pull request #10726 from subhamkrai/handle-v1beta-cronjob
core: no need to delete v1beta cronJob during v1 deletion
2022-08-17 10:39:46 -06:00
subhamkrai e1a585e55f core: no need to delete v1beta cronJob during v1 deletion
we are already deleting v1beta1 cronJob while creating v1 cronJob,
so no need to delete v1beta while v1 cronJob deltion.

Signed-off-by: subhamkrai <srai@redhat.com>
2022-08-17 19:53:59 +05:30
Jiffin Tony Thottan 8003e764f9 rgw: add custom endpoint list option for zone
User can define his desired endpoint list in Zone CR so that it will
overwrite the default service name for rgw.

Resolves #6432

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
2022-08-17 10:03:12 +05:30
Blaine Gardner b98efbb320 nfs: add support for running SSSD as a sidecar
Implement the SSSD sidecar design for NFS.

Because NFS documents are getting long, create an NFS
`Storage-Configuration` section with separated topics to keep the `NFS
Overview` document sane.

Adjust the SSSD design to allow any VolumeSource, not just ConfigMaps.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2022-08-11 14:59:23 -06:00
Travis Nielsen 5ef8d15659 build: format comments for go 1.19
The tool gofmt in go 1.19 requires certain formatting
in the comments section for better rendering.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-08-11 12:41:10 -06:00
Travis Nielsen 759b0d1c24 core: use the cluster name due to updated api reference
The cephcluster.ClusterName is no longer available in the k8s api
with the ObjectMeta type, so we use the cephcluster.Name

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-08-11 12:31:50 -06:00
Joseph Lee 9639b60fc4 core: skip ceph upgrade check in external cluster
Closes: rook#10688
Signed-off-by: Joseph Lee <joseph@jc-lab.net>
2022-08-11 19:09:40 +09:00
Mudit Agarwal 40081cbcd2 Revert "csi: remove attacher sidecar from CephFS rook deployment"
This reverts commit 4bfd88dc4d.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2022-08-10 13:04:14 +05:30
Travis Nielsen 7c56b9328a core: operator skips reconcile of mons and osds in debug
During certain maintenance tasks the admin will own running
operations on the ceph mons and osds, and the operator should
not interfere with those operations. If the operator sees
any mon in debug mode, every reconcile and mon health check
will be skipped. Thus, mons will not be updated while any
one of them is in maintenance. During OSD reconcile, individual
OSD deployment updates will only be skipped for OSDs that are
actively being debugged.

The debug mode for osd and mon deployments is signaled by
creating the ceph.rook.io/do-not-reconcile label.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-08-09 15:26:04 -06:00
yati1998 4bfd88dc4d csi: remove attacher sidecar from CephFS rook deployment
CephFS CSI driver dont have/advertise controller publish/unpublish
capabilities, thus dont need attacher sidecar for its operations.
The presence of external-attacher adds on overhead and issues wrt
attachment in various scenarios. One of them would be the lack of
performance on syncing volumeattachment from api server..etc.
More or less we don't have controller publish and unpublish capabilities,
so we should not make use of this sidecar and cause
unnecessary addon here thus other issues.

similar changes have been added to CSI
https://github.com/ceph/ceph-csi/pull/3149

Signed-off-by: yati1998 <ypadia@redhat.com>
2022-08-03 19:56:39 +05:30
yati1998 ecc67faa5c csi: introduce new log level for sidecars
This commit introduces new log level called csidecarLogLevel
for the sidecars which are not maintained by the csi-driver.
This will allow to have different configuration options
for the sidecars like snapshotter, resizer, attacher and
provisioner containers which will help to avoid the
spamming of logs to an extent.

Signed-off-by: yati1998 <ypadia@redhat.com>
2022-08-02 12:09:43 +05:30
Travis Nielsen e78714c21b Merge pull request #10204 from thotz/rgw-sse-s3-vault
object: adding support for sse s3 for RGW
2022-08-01 16:31:50 -06:00
Travis Nielsen 388ec24089 Merge pull request #10528 from subhamkrai/log-collecto-max-size
core: add support to rotate log based on logfile size
2022-08-01 15:23:03 -06:00
Travis Nielsen 0fac38c33d Merge pull request #10647 from Madhu-1/fix-8783
csi: disable liveness sidecar by default
2022-08-01 12:58:53 -06:00
Madhu Rajanna 187bea6701 csi: disable liveness sidecar by default
A Liveness sidecar container that is deployed
with the CSI pods will be helpful to check
csi driver is properly responding or not.
and there is no liveness or readiness
kubernetes probe added for this one.
Providing an option to enable this
sidecar deployment and disabling it by default.

fixes #8783

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-07-28 14:01:26 +05:30
Jiffin Tony Thottan 5c8ca01bd0 object: adding support for sse s3 for RGW
The RGW support server side encryption with help of s3 protocol, till
now the `sse:kms` was support in which keys will be provided by the user
and but it will be saved in external management service like vault. Now
the support for `sse:s3` is added so the entire encryption key
management is performed by RGW itsels.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2022-07-28 11:50:48 +05:30
Jiffin Tony Thottan 6f4f10a3c5 object: add the external rgw server check properly
In object package code, external rgw server check is whether ceph cluster
is external instead of rgw. Correcting such scenarios in the code base.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2022-07-27 22:52:18 +05:30
subhamkrai 62f73dcd98 core: add support to rotate log based on logfile size
this commits add new field `MaxLogSize` inside `LogCollectorSpec` of
cephCluster cr which will take max size of log after which we want to
rotate the log.

Signed-off-by: subhamkrai <srai@redhat.com>
2022-07-26 13:06:39 +00:00
Travis Nielsen 89fadabcc1 Merge pull request #10575 from shalevpenker97/EnableRBDStats-mgr-fix
Fix EnableRBDStats mgr
2022-07-18 12:57:54 -06:00
Travis Nielsen e3256c07fe Merge pull request #10523 from leseb/fix-stuck-reconciler
core: fix stuck reconciler (more checkpoints for cancelled context)
2022-07-18 08:58:07 -06:00
Eng Zer Jun 8a25b1d903 test: use T.Setenv to set env vars in tests
This commit replaces `os.Setenv` with `t.Setenv` in tests. The
environment variable is automatically restored to its original value
when the test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.Setenv
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-07-15 23:07:19 +08:00
Travis Nielsen fc541764f1 Merge pull request #10484 from jsoref/spelling
core: fix spelling
2022-07-15 08:31:41 -06:00
Travis Nielsen 37a4d9e959 Merge pull request #10491 from zhucan/feat-10451
object: network mode can be set separately for cephcluster and rgw
2022-07-14 11:21:26 -06:00
Travis Nielsen e1f52afc2e Merge pull request #10570 from subhamkrai/update-default-leader-election
csi: default values of leader election not enough
2022-07-13 08:04:50 -06:00
subhamkrai 5e92a30a77 csi: default values of leader election not enough
csi pods uses leader election and they were using
default values but seems like default values of leader
election are not working for some specific clusters.

Signed-off-by: subhamkrai <srai@redhat.com>
2022-07-13 09:50:39 +05:30
Travis Nielsen b8dac76d18 mgr: skip updating service if there is no selector
When the mgr services are updated by the operator to set the
active mgr properly, skip services that do not currently
have a selector set.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-07-12 16:30:20 -06:00
Sébastien Han a6036074db core: more checkpoint for context cancelled
Some context canceled were missed and not reported correctly. We had
multiple reconcilers running in //. Since they all run in goroutine then
will continue to run until they timeout (if timeout is available,
    otherwise would run forever until the op is restarted).

Signed-off-by: Sébastien Han <seb@redhat.com>
2022-07-12 12:07:59 +02:00