Commit Graph
7961 Commits
Author SHA1 Message Date
Travis Nielsen 093cf6dbbd cassandra: generate the crds from types for v1
The CRDs v1 requires the full schema for all settings, so we now
generate the CRDs for cassandra for full fidelity of all the
settings.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-07-20 08:18:05 -06:00
Travis Nielsen 6ad9190f55 ceph: factor out test manifest helpers for providers
The ceph provider had been refactored to read the crds
and operator manifests from a file instead of copying the
manifests into the test code. Now the helpers are refactored
to allow the other providers to also reduce the manifest
duplication in tests.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-07-20 08:17:29 -06:00
Travis Nielsen 14227600cc Merge pull request #7535 from travisn/mon-stretch-location
ceph: Set the location on the mon daemon for stretch clusters
2021-07-20 08:17:01 -06:00
Sébastien Han 5e3ce936bf Merge pull request #8339 from leseb/multus-rbd-commands
ceph: proxy rbd commands when multus is enabled
2021-07-20 16:14:55 +02:00
n.fraison db2c8792b0 ceph: create rook-ceph-system ClusterRoleBinding in operator namespace
Operator can run on a namespace not named rook-ceph
The ClusterRoleBinding muste rely on .Release.Namespace helm value
Also move the ClusterRole and ClusterRoleBinding in appropriate yaml file

Signed-off-by: n.fraison <n.fraison@criteo.com>
2021-07-20 16:02:23 +02:00
Travis Nielsen 107f89260d ceph: reconcile mgr services with every reconcile
When there are multiple mgr daemons, the mgr sidecar owns reconciling
the services for the active mgr. However, for efficiency the sidecar
only reconciles the services if the active mgr changes. Now the operator
will also reconcile the mgr services to ensure that services are re-created
after being deleted, or otherwise in an incorrect state.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-07-20 07:23:58 -06:00
Travis Nielsen 3d629ea2a4 ceph: set minimum version for stretch clusters to v16.2.5
The stretch clusters pass a new parameter to the mon daemons which is
only available in v16.2.5 and newer. Older versions of Ceph will fail
to run with stretch clusters in rook.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-07-20 07:22:01 -06:00
Sébastien Han 1900160939 ceph: proxy rbd commands when multus is enabled
We now pass the networking spec to the clusterInfo so that the executor
can make the right decision on how to execute a command.
This is a small change that allows us to remove the CephBlockPool CR
since it's checking for rbd images. On a Multus deployment, the operator
does not have the network annotations, thus has no access to the OSD
network then rbd commands are hanging forever.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-07-20 12:28:00 +02:00
Travis Nielsen a0b4b30101 ceph: example manifest for stretch cluster in aws
Show an example of configuring a stretch cluster in AWS.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-07-19 14:30:45 -06:00
Travis Nielsen fca761c950 ceph: set the location on the mon daemon
The mon daemon in a stretch cluster now can have its location set
as a CLI param instead of setting it with a separate command.
This enables mon failover to set the location of a mon immediately
when it is joining quorum instead of having a delayed command
to set the location.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-07-19 14:30:43 -06:00
Sébastien Han ce5777e528 Merge pull request #8155 from subhamkrai/osd-keyring
ceph: create new keyring for osd
2021-07-19 17:18:36 +02:00
subhamkrai d254c935e8 ceph: create new keyring for osd
when osd pods removed, they are not able
to add back due to missing `ceph auth`
or different `ceph auth`.

this commit mounts the secret `rook-ceph-admin-keyring`
inside the osd activate initcontainer which has
admin keyring.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-07-19 19:26:06 +05:30
Travis Nielsen b65e088ec3 Merge pull request #8325 from travisn/ceph-16.2.5
ceph: Update default ceph image to latest v16.2.5
2021-07-16 14:25:51 -06:00
Travis Nielsen 64df4cdbb6 ceph: update default ceph image to latest v16.2.5
The latest pacific release is 16.2.5 so we set this as the default
for Rook to deploy.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-07-16 10:21:48 -06:00
Travis Nielsen 9092c58405 Merge pull request #7969 from cybozu-go/ceph-add-the-description-to-create-osd-on-lv
docs: add the example of pvc-based ceph cluster on top of bare metal
2021-07-15 16:54:03 -06:00
Satoru Takeuchi fe8efeb028 docs: add the example of pvc-based ceph cluster on top of bare metal
Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2021-07-14 21:11:39 +00:00
Satoru Takeuchi fa153421db Merge pull request #8304 from cybozu-go/ceph-mount-dev-directory-in-lvm-mode-osd-on-lv-backed-pvc
ceph: mount dev directory in lvm mode osd on  osd on lv-backed pvc
2021-07-14 05:25:59 +09:00
Sébastien Han 6dad71a7f1 Merge pull request #8310 from leseb/bz-1981849
ceph: add missing ceph cluster spec
2021-07-13 19:23:14 +02:00
Sébastien Han 1fd76a1168 ceph: add missing ceph cluster spec
The lib-bucket-provisioner was missing the cephCluster spec so the check
in RunAdminCommandNoMultisite would fail.
This is similar to ad54ed8aac just a
different place.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-07-13 18:45:39 +02:00
Satoru Takeuchi 32295335a1 Merge pull request #8301 from cybozu-go/ceph-create-pdb-for-all-rgw-and-cephfs
ceph: create pdb for all rgw and cephfs
2021-07-13 22:09:34 +09:00
Satoru Takeuchi 763b076c75 ceph: mount dev directory in lvm mode osd on osd on lv-backed pvc
"/dev/" is only mounted on OSD on device. However, this directory
should also be mounted on OSD on LV-backed PVC.

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

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2021-07-13 12:21:41 +00:00
Satoru Takeuchi 5418d2dceb ceph: create pdb for all rgw and cephfs
Fix the improper breaking from the loops to add pdbs.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2021-07-13 05:23:51 +00:00
Travis Nielsen 8afd8b2174 Merge pull request #8296 from ashangit/helm_cluster_imagePullSecrets
rook: Add image pull secrets option on new helm cluster
2021-07-12 14:58:18 -06:00
Sébastien Han 9f4e233c38 Merge pull request #8297 from leseb/add-missing-spec
ceph: add missing spec to the object context
2021-07-12 16:53:53 +02:00
Sébastien Han d19f702cd0 Merge pull request #8288 from leseb/destroy-kv-v2-secrets
ceph: destroy all vault keys on kv version 2
2021-07-12 15:47:07 +02:00
Sébastien Han ad54ed8aac ceph: add missing spec to the object context
The CephClusterSpec was missing from the object context, so the check
for the network provider in RunAdminCommandNoMultisite() was not
discovering the network property correctly.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-07-12 15:46:09 +02:00
n.fraison 50c8c7a7f7 ceph: add image pull secrets option on new helm cluster
Allow to specify imagePullSecrets to pull operator/ceph images from private registry

Signed-off-by: n.fraison <n.fraison@criteo.com>
2021-07-12 10:15:06 +02:00
Sébastien Han fa14361469 Merge pull request #8286 from leseb/fix-object-store-user
ceph: always rehydrate the access and secret keys
2021-07-12 09:12:49 +02:00
Sébastien Han f074c12c4d ceph: get the s3 user first instead of create
The Rados Gateway Admin OPS API has changed its behavior from Nautilus
to Pacific. Calling user create on an existing user wil generate
additional keys to the user on Nautilus. Where in Pacific it will report
an error with UserAlreadyExists.
So to handle both scenarios, let's first get the user, and if the user
does not exist (NoSuchUser) we then create it.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-07-09 18:32:48 +02:00
Sébastien Han 7e0b58cc27 ceph: destroy all vault keys on kv version 2
By default, keys stored in Vault KV Secret Engine are versioned and keys
are soft-deleted, see Vault documentation:

When deleting data the standard vault kv delete command will perform a soft
delete.
It will mark the version as deleted and populate a deletion_time timestamp.
Soft deletes do not remove the underlying version data from storage,
which allows the version to be undeleted.
The vault kv undelete command handles undeleting versions. A version's
data is permanently deleted only when the key has more versions than are
allowed by the max-versions setting, or when using vault kv destroy.
When the destroy command is used the underlying version data will be
removed and the key metadata will be marked as destroyed.
If a version is cleaned up by going over max-versions the version
metadata will also be removed from the key.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-07-09 11:03:17 +02:00
Sébastien Han 40a262c0f8 ceph: bump libopenstorage/secrets to latest
Use the latest version of libopenstorage/secrets to get support for
destroying kv version 2 secrets.
See: https://github.com/libopenstorage/secrets/pull/55

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-07-09 10:58:42 +02:00
Sébastien Han 1e45eaa436 ceph: always rehydrate the access and secret keys
Prior to that the access and secret keys were left empty if the user
already existed, which led to updating the secret with empty values when
the operator restarts.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-07-09 10:39:52 +02:00
Sébastien Han 319828a7c7 Merge pull request #8274 from cybozu-go/ceph-fix-pdb-of-rgw-pods
ceph: fix pdb of RGW instances
2021-07-08 15:50:29 +02:00
Sébastien Han 741dd25efb Merge pull request #8278 from leseb/retry-ci
ci: retry on network errors
2021-07-08 08:52:28 +02:00
Sébastien Han eaa6e7732c Merge pull request #8272 from leseb/exec-in-pod
ceph: proxy ceph command when multus is configured
2021-07-07 21:36:54 +02:00
Sébastien Han bd58790c31 ceph: proxy ceph commands when multus is configured
When the CephCluster is configured with Multus and multiple networks are
used to deploy Ceph some commands are failing to be executed from the
Operator. These commands, in particular, `radosgw-admin` ones need access
to the "ceph public network" to talk to OSDs. Unfortunately, the
Rook-Ceph Operator does not have the network annotations and thus
doesn't have the networks available and cannot reach OSDs. So the commands end
up hanging and eventually time out.
Applying the annotations to the Operator pod is possible but will result
in restarting the operator too and this should be avoided at all costs.
Also, applying the annotations beforehand is not possible since the
Multus declaration is in the CephCluster specification. So we would have
no idea what to do.

So the current approach runs a new sidecar container in the mgr pod to
act as a proxy for "some" ceph commands, only the `radosgw-admin` ones
for multi-site setup. This is a small container with admin access
running idle waiting for commands to be executed. In a sense, it is
similar to the toolbox but we didn't want to clearly expose it, so
running as a sidecar is quite nice.

Proxying command is obviously not always recommended since we add an
extra hop in the network path. Now each request has to go from the
operator pod to the API server to the remote pod to Ceph. Previously,
the command only goes from the operator to Ceph.

It's worth noting that external mode is not impacted since no rgw pod
is configured. This scenario is flexible and allows us to scale
pretty well since any CephCluster with Multus will see its mgr sidecar
deployed and can then talk to Ceph. We are not limited.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-07-07 19:08:32 +02:00
Sébastien Han ff8d24a296 ci: retry on network errors
Seen today in https://github.com/rook/rook/pull/8272/checks?check_run_id=3010477951

```
github.com/rook/rook/pkg/apis/ceph.rook.io/v1 imports
	github.com/hashicorp/vault/api: github.com/hashicorp/vault@v1.4.2: reading https://proxy.golang.org/github.com/hashicorp/vault/@v/v1.4.2.zip: 503 Service Unavailable
	server response: Service Unavailable
github.com/rook/rook/pkg/daemon/ceph/osd/kms imports
	github.com/libopenstorage/secrets/vault imports
	github.com/hashicorp/vault/command/agent/auth: github.com/hashicorp/vault@v1.4.2: reading https://proxy.golang.org/github.com/hashicorp/vault/@v/v1.4.2.zip: 503 Service Unavailable
	server response: Service Unavailable
github.com/rook/rook/pkg/daemon/ceph/osd/kms imports
	github.com/libopenstorage/secrets/vault imports
	github.com/hashicorp/vault/command/agent/auth/kubernetes: github.com/hashicorp/vault@v1.4.2: reading https://proxy.golang.org/github.com/hashicorp/vault/@v/v1.4.2.zip: 503 Service Unavailable
	server response: Service Unavailable
make: *** [go.mod.check] Error 1
```

Also https://github.com/rook/rook/pull/8272/checks?check_run_id=3010482113

```
go get: sigs.k8s.io/controller-tools@v0.4.1 updating to
	sigs.k8s.io/controller-tools@v0.5.1-0.20210420220833-f284e2e8098c requires
	k8s.io/apimachinery@v0.20.2 requires
	github.com/json-iterator/go@v1.1.10: verifying go.mod: github.com/json-iterator/go@v1.1.10/go.mod: reading https://sum.golang.org/tile/8/0/x005/043: stream error: stream ID 1099; INTERNAL_ERROR
make[3]: *** [/home/runner/work/rook/rook/.cache/tools/linux_amd64/controller-gen-f284e2e8098cb0193c2b0c7c1c651ae75496539b] Error 1
make[2]: *** [generate-csv-ceph-templates] Error 1
```

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-07-07 18:00:01 +02:00
Sébastien Han d6dd557961 Merge pull request #8276 from subhamkrai/update-helm-ci-version
ci: update helm version to 3.6.2
2021-07-07 17:28:50 +02:00
subhamkrai bc1fabb6e4 ci: update helm version to 3.6.2
this commit update helm version to `3.6.2`

Signed-off-by: subhamkrai <srai@redhat.com>
2021-07-07 20:09:26 +05:30
Satoru Takeuchi 7885b775ec ceph: fix pdb of RGW instances
It's better to create PDB of RGW if ObjectStore's `instances` field is 2.
In the current implementation, at least three desired RGW instances are needed
to create this. If `instances` is 1, we can still safely skip the creation
of PDB because it's useless.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2021-07-07 13:22:33 +00:00
Sébastien Han 65ab66d3f4 Merge pull request #8269 from thotz/healthcheckadminops
ceph: remove creation of adminops client in checkObjectStoreHealth()
2021-07-06 16:57:11 +02:00
Sébastien Han 93937fb0b5 Merge pull request #8243 from thotz/rgwk8stlssupport
ceph: add support for tls certs via k8s tls secrets for rgw
2021-07-06 16:56:33 +02:00
Sébastien Han e3efdb374b Merge pull request #8242 from subhamkrai/helm-suite-failing
ci: in helm chart field should not be empty
2021-07-06 16:56:08 +02:00
Jiffin Tony Thottan 1665ad6ea7 ceph: add support for tls certs via k8s tls secrets for rgw
With this PR the RGW can accept TLS certs as K8s TLS secrets

Fixes: 2079
Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2021-07-06 16:30:16 +05:30
subhamkrai 34313c9dc9 ci: in helm chart field should not be empty
ci is complaining due to empty field in
values.yaml with error
```
coalesce.go:199: warning: destination for config is a table. Ignoring non-table value <nil>
```
this commit make those field empty map/list.

Closes: https://github.com/rook/rook/issues/8239
Signed-off-by: subhamkrai <srai@redhat.com>
2021-07-06 14:28:58 +05:30
Jiffin Tony Thottan 6c2c95284c ceph: remove creation of adminops client in checkObjectStoreHealth()
The adminops client is already created in newBucketChecker(), use that
instance in checkObjectStoreHealth() than creating a new one.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2021-07-06 11:40:11 +05:30
Sébastien Han 830b36c039 Merge pull request #7920 from thotz/tlscitest
test: ci test for TLS objectstore
2021-07-05 11:23:40 +02:00
Sébastien Han c4d15f4de2 Merge pull request #8254 from henryzhangsta/helm-network-optional
ceph: network configuration should be optional in Helm chart
2021-07-05 11:23:09 +02:00
Sébastien Han 97f1cc3fd2 Merge pull request #8244 from thotz/obcfetchcorrectport
ceph: fetch rgw port from cephobjectstore crd for obc
2021-07-05 11:21:48 +02:00
Sébastien Han 23f3f17d24 Merge pull request #8250 from travisn/nfs-error-on-scaledown
ceph: Scaling down nfs deployment was failing
2021-07-05 11:19:11 +02:00