Commit Graph
3594 Commits
Author SHA1 Message Date
Rakshith R 73042c7531 csi: add NFS snapshot support
This commit adds snapshotter sidecar to
NFS driver and required yamls and docs too.

Signed-off-by: Rakshith R <rar@redhat.com>
2022-09-08 16:15:37 +05:30
Blaine Gardner 270579e144 Merge pull request #10776 from motorailgun/better-healthcheck-message
operator: improve ProbeHandler error message
2022-09-07 11:49:59 -06:00
Travis Nielsen 80e80ffeb2 Merge pull request #10906 from Madhu-1/fix-csi-config
csi: remove findCSIChange from predicate
2022-09-07 09:10:55 -06:00
yati1998 cc4fd0c547 csi: remove controller-ip from csi-addons
This commit removes controller-ip parameter from
csi-addons sidecar as it is no longer required to be
passed.

Signed-off-by: yati1998 <ypadia@redhat.com>
2022-09-07 14:49:32 +05:30
yati1998 9b4361b379 rbdmirror: remove volume replication sidecar
The volume replication operator is being moved to
kubernetes-csi-addons. This commit hence, removes
the volume replication sidecar and updates the
related documentation.
It will also update the csi-addons sidecar version
to the latest one.

Closes: #10655

Signed-off-by: yati1998 <ypadia@redhat.com>
2022-09-07 14:49:19 +05:30
Madhu Rajanna 5b843a17a1 csi: remove findCSIChange from predicate
findCSIChange will work only for single
line values/configration in the configmap,
If the value is multiline the regex will not
be able to indentify the change because of this
one no configurations will be applied to the
csi driver. Removing this check so that if there
is any update on the configmap we will
reconcile the csi driver.

Note:- This might looks heavy but updating of config
map is not a frequent event.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-09-07 13:08:56 +05:30
motorailgun ff0951738f operator: improve ProbeHandler error message
This commit implements more diagnostic error for unsccessful
Liveness- and Readiness-Probe of Pods.

Added codes are expected to catch failures of
`ceph status` and `ceph mon_status`, and report it.

Closes: https://github.com/rook/rook/issues/9846
Closes: https://github.com/rook/rook/issues/9852

Signed-off-by: motorailgun <motoi_public@mail.aria-on-the-planet.es>
Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2022-09-07 07:35:33 +00:00
Travis Nielsen 1bbf8f7a43 Merge pull request #10791 from Rakshith-R/use-cephcsi-nfsnodeplugin
csi: use cephcsi image for nfs nodeserver + holder design
2022-09-06 10:52:30 -06:00
Travis Nielsen c840fd7903 Merge pull request #10854 from humblec/fsgroup-rbd
csi: change the default fsgroup policy for CSI driver object
2022-09-06 07:23:16 -06:00
Satoru Takeuchi c7ab01b946 Merge pull request #10858 from cybozu-go/osd-refactoring
osd: refactor code
2022-09-03 06:25:17 +09:00
Satoru Takeuchi 00b3d0f323 osd: refactor code
Simplify osd management code.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2022-09-02 11:17:05 +00:00
Rakshith R 7722226521 csi: remove nfs image
This commit remove nfs image
since it is no longer needed.
Cephcsi itself will act as nfs
nodeserver.

Signed-off-by: Rakshith R <rar@redhat.com>
2022-09-02 14:16:15 +05:30
Rakshith R 7c6e4d71bc csi: add holder pod support for nfs
This commit adds holder pod support
for nfs to be able to work in non-host
networking scenario, without being
affected by restarts of csi-nfsplugin.

Signed-off-by: Rakshith R <rar@redhat.com>
2022-09-02 14:16:15 +05:30
Rakshith R 9405b59ff4 csi: use cephcsi image for nfs nodeserver
Cephcsi v3.7 now supports nfs nodeserver.
This commit changes nfs nodeserver image to
cephcsi image and makes other necessary
modifications to template.

Signed-off-by: Rakshith R <rar@redhat.com>
2022-09-02 14:16:15 +05:30
Madhu Rajanna 32943b64e3 csi: add missing serviceAccoutName to holder
Add missing serviceAccountName for the holder
daemonset to create the pods with required
access.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-09-02 13:20:47 +05:30
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
Satoru Takeuchi 8b513a4a74 osd: disallow to create osd on lv with metadata device
OSD on logical volume is raw mode. This mode can'set metadata device.
We should not mark a logical volume as available in this case.

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

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2022-09-01 05:12:43 +00:00
Humble Chirammal 32ecc37d37 csi: change the default fsgroup policy for CSI driver object
This commit change the default fsgroup policy for csi driver object
to "File" type which is the better/correct setting for the CSI volumes
We have been using default value which is "ReadWriteOnceWithFSType".
with this change backward compatibility should be preserved.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-09-01 10:11:39 +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
Satoru Takeuchi 07620ee34c Merge pull request #10834 from travisn/min-k8s-version-support
build: Update min version to k8s 1.19
2022-08-31 19:28:28 +09: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
Satoru Takeuchi 0e63c01ef3 Merge pull request #10779 from taki-d/fix-osd-detection
osd: fix osd detection logic for old lsblk
2022-08-31 14:44:05 +09: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
taki-d ca73efa1e5 osd: fix osd detection logic for old lsblk
Old lsblk can't detect bluestore signature.
So read the head of device and verify signature
as a workaround.

closes: https://github.com/rook/rook/issues/10665

Signed-off-by: taki-d <mail@orangepla.net>
2022-08-31 11:02:25 +09: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
zhucan 1da927e40e object: generated code
Signed-off-by: zhucan <zhucan.k8s@gmail.com>
2022-08-22 14:46:56 +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