Commit Graph
6995 Commits
Author SHA1 Message Date
Sébastien Han e38601ac2d ceph: always skip disks with filesystem
Unless they are encrypted disk and have markers for a ceph cluster.

Closes: https://github.com/rook/rook/issues/8046
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-06-03 14:42:29 +02:00
Blaine Gardner fca5dec044 Merge pull request #7885 from BlaineEXE/block-ceph-delete-if-pool-data
docs: add design for blocking CephCluster deletion
2021-06-02 17:03:55 -06:00
Travis Nielsen 054004ba76 Merge pull request #7946 from leseb/ci-arm64-run
ci: add arm64 runner
2021-06-02 10:13:31 -06:00
Travis Nielsen 5c332f6954 Merge pull request #8020 from Rakshith-R/csi/retry-on-k8s-err
ceph: retry starting CSI drivers on failure
2021-06-02 09:28:31 -06:00
Sébastien Han 4beb928c04 Merge pull request #8031 from leseb/stop-monitoring-on-deletion
ceph: stop the monitoring before cleanup
2021-06-02 17:22:44 +02:00
Sébastien Han e478bdadb1 ceph: stop the monitoring before cleanup
Saw this today in the logs:

```
2021-06-02 13:02:54.787838 I | ceph-block-pool-controller: deleting pool "testpool"
2021-06-02 13:02:56.178094 I | cephclient: no images/snapshosts present in pool "testpool"
2021-06-02 13:02:56.178125 I | cephclient: purging pool "testpool" (id=17)
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1cef49f]

goroutine 1607 [running]:
github.com/rook/rook/pkg/operator/ceph/pool.(*mirrorChecker).checkMirroringHealth(0xc001a98ba0, 0x8, 0xc000d34c60)
	/home/runner/work/rook/rook/pkg/operator/ceph/pool/health.go:115 +0xdf
github.com/rook/rook/pkg/operator/ceph/pool.(*mirrorChecker).checkMirroring(0xc001a98ba0, 0xc0016fd500)
	/home/runner/work/rook/rook/pkg/operator/ceph/pool/health.go:82 +0x147
created by github.com/rook/rook/pkg/operator/ceph/pool.(*ReconcileCephBlockPool).reconcile
	/home/runner/work/rook/rook/pkg/operator/ceph/pool/controller.go:298 +0xee5
```

Essentially, it's intermittent but when deleting the pool the
healthcheck kicked in and fetched the mirroring status, which returned
empty. THe subsequent code tried to access content of a nil pointer,
  hence the error.
So now we stop monitoring first, then we proceed with the deletion.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-06-02 16:14:10 +02:00
Rakshith R 411e36900e ceph: retry starting CSI drivers on failure
CSI drivers failed to start if rook encountered error
while reading configmap with no retry.
This commit introduces retry for starting CSI driver
if there is a failure in reading configmap upto 3 times.

Fixes: #7950

Signed-off-by: Rakshith R <rar@redhat.com>
2021-06-02 19:36:55 +05:30
Travis Nielsen 4cf43bef95 Merge pull request #8006 from Rakshith-R/feature/options-toleration-affinity
ceph: add support for adding rbd and cephfs tolerations and affinities separately
2021-06-02 07:55:23 -06:00
Sébastien Han ba8940800f Merge pull request #8005 from leseb/luks-label
ceph: add ceph cluster fsid to LUKS header
2021-06-02 14:52:56 +02:00
Sébastien Han b178c8ae2c ci: add arm64 hosted runner
Thanks to @xin3liang we now have 2 hosted runners on ARM64. So let's add
a small integration test for it.
The action will run every day at midnight.

Successful run: https://github.com/rook/rook/pull/7946/checks?check_run_id=2726403458

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-06-02 11:54:43 +02:00
Sébastien Han 296074ca4f Merge pull request #8025 from travisn/remove-build-status
docs: Remove build status badge
2021-06-02 11:32:25 +02:00
Sébastien Han 78a497035e Merge pull request #8021 from rohan47/multus_doc
ceph: updated multus documentation with examples
2021-06-02 09:29:40 +02:00
Rakshith R 87cf668b28 ceph: add option for adding csi pods' tolerations & affinity separately
This commit adds support for adding tolerations and affinities for
cephfs and rbd (provisioner & nodeplugin) pods separately.

Closes: #7060

Signed-off-by: Rakshith R <rar@redhat.com>
2021-06-02 11:30:38 +05:30
Travis Nielsen b98ba555fa Merge pull request #7996 from subhamkrai/cert-manager-errors
ceph: fix cert manager errors
2021-06-01 23:23:14 -06:00
Travis Nielsen 59d160634f docs: add link for email on security topics
To ensure emails on the topics of security questions are sent to the
correct list, another link is added to the list of contacts.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-06-01 15:47:29 -06:00
Travis Nielsen f7e5a0a017 docs: remove the build badge from the readme
The build status is only interesting to maintainers of the project
and is not really relevant to community members who are considering
running the project. The release builds are always considered stable
and whether the master build is intermittently failing is
not important to the community.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-06-01 15:42:55 -06:00
Blaine Gardner cf5493c082 docs: design to block delete of dependent resources
Add a design for blocking deletion of Rook-Ceph custom resources
whenever there are other resources which refer to them.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-06-01 12:19:06 -06:00
rohan47 312854c4cb ceph: updated multus documentation with examples
updated multus documentation with ceph-cluster example and multiple
examples to show the network selector settings.

Signed-off-by: rohan47 <rohgupta@redhat.com>
2021-06-01 23:19:39 +05:30
Travis Nielsen 642a30de8e Merge pull request #8022 from leseb/to-upper-op-config
ceph: force upper case for Operator log level
2021-06-01 08:22:48 -06:00
Sébastien Han 7e7be7ea56 ceph: force upper case for Operator log level
When the operator configmap is edited, it is likely that some user will
simply put "debug" instead of "DEBUG", so let's always transform the
value to upper case to ease user experience.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-06-01 10:51:44 +02:00
Sébastien Han 23777c859b ceph: remove potential new lines from the vault token variable
In some circonstances the VAULT_TOKEN env variable contains a new line.
We don't really know how and why. The saw this when upgrading from
Nautilus CentOS 7 to Octopus CentOS 8. So there might be something
different with bash and variable expansion.
Anyway, let's remove any potential new line and trailing spaces from
that var.

The error was splitting the curl line to something like:

```
+ curl --silent --show-error --request GET --header 'X-Vault-Token: s.aCHdo57tF19ddN1hQmGVyG8a
' --insecure https://vault.default.svc.cluster.local:8200/v1/rook/ver1/rook-ceph-osd-encryption-key-set1-data-0pztgf
curl: (92) HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
```

Where a correct line will be:

```
+ curl --silent --show-error --request GET --header 'X-Vault-Token: s.aCHdo57tF19ddN1hQmGVyG8a' --insecure https://vault.default.svc.cluster.local:8200/v1/rook/ver1/rook-ceph-osd-encryption-key-set1-data-0pztgf
```

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-05-31 16:33:43 +02:00
Sébastien Han 26c0f8bcc1 ceph: only pass vault volume projection is necessary
We don't need to pass the Volume with projection for TLS when TLS is not enabled
Somehow when this happens and we try to update a deployment spec it fails with:

```
 ValidationError(Pod.spec.volumes[7].projected): missing required field "sources"
```

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-05-31 16:33:40 +02:00
Sébastien Han 0004869f66 ceph: add ceph cluster fsid to LUKS header
When configuring encrypted on-pvc clusters we now set the cluster fsid
in the LUKS header. If needed we can then determine if the encrypted
block is part of our cluster or not. We also attach the pvc_name in case
it might become useful.

Closes: https://github.com/rook/rook/issues/7991
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-05-31 15:01:52 +02:00
Sébastien Han 7c42b61f3c ci: add more debug logs to failed job
Gather more logs.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-05-31 14:16:46 +02:00
Sébastien Han 4bdc02e16e Merge pull request #8011 from travisn/remove-one-mon-at-time
ceph: remove one extra mon per health check
2021-05-31 09:45:43 +02:00
subhamkrai 7f0179c1ba ceph: update cert-manager version
this commit update cert-manager to v1.3.1

Signed-off-by: subhamkrai <srai@redhat.com>
2021-05-31 11:27:02 +05:30
subhamkrai 9773634cc1 ceph: wait for cainjector to inject the CA certificates
adding 20s sleep to let cainjector to inject the CA
certificates into cert-manager webhook.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-05-31 11:27:02 +05:30
subhamkrai c738982503 ceph: add more log to admission controller
adding more logs in case there are errors
starting admission controller.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-05-31 11:27:02 +05:30
Satoru Takeuchi cb7f25d200 Merge pull request #8000 from cybozu-go/ceph-parse-json-correctly
ceph: parse json correctly
2021-05-28 22:31:27 +09:00
Travis Nielsen 9e982a0eff ceph: remove one extra mon per health check
If the number of desired mons is reduced, for example from 5 down to 3,
the extra mons will be removed by the next health check. Only a single
mon can be removed per health check to ensure that other mons do not
become unhealthy at the same time as removing an extra mon, and so the
list of healthy mons can be refreshed. If multiple mons are removed in
a single health check, we risk removing too many mons and losing quorum.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-05-27 14:34:09 -06:00
Travis Nielsen b281859602 Merge pull request #8001 from iamniting/expand
ceph: expand PVC only if storageclass allow expansion
2021-05-27 14:08:28 -06:00
Travis Nielsen 1af84e34c0 Merge pull request #7778 from henryzhangsta/ceph-cluster-helm-chart
ceph: implement CephCluster CRD Helm Chart
2021-05-27 12:41:01 -06:00
Travis Nielsen 12352590df Merge pull request #8008 from thotz/vaultkmstransitenginebackendpath
ceph: update the backend path for transit engine
2021-05-27 12:16:04 -06:00
Nitin Goyal 7df51fab59 core: expand PVC only if storageclass allow expansion
Expand the functionality of 'ExpandPVCIfRequired' to check if
storageclass does allow expansion then only expand the PVC.
otherwise skip the expansion.

Signed-off-by: Nitin Goyal <nigoyal@redhat.com>
2021-05-27 22:50:16 +05:30
Jiffin Tony Thottan d909c309f3 ceph: update the backend path for transit engine
The backend has for trasnit secret in vault kms for RGW is changed from pacific

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2021-05-27 22:48:21 +05:30
Henry Zhang ecf6bdcfae ceph: add build and tests for rook-ceph-cluster Helm chart
Adds rook-ceph-cluster chart to chart build, add tests.
Pulled out some common functionality between the Helm and non-Helm installers

Signed-off-by: Henry Zhang <me@henry.dev>
2021-05-27 01:08:27 -07:00
Henry Zhang b59858af38 ceph: implement CephCluster CRD Helm Chart
This manages a CephCluster CRD, and is designed to be deployed into its own namespace to manage a single Ceph cluster independent of the main Rook operator.

Additional functions:
- Ability to setup ServiceMonitor for the Prometheus operator

Signed-off-by: Henry Zhang <me@henry.dev>
2021-05-27 01:08:27 -07:00
Sébastien Han 74bae84bb7 Merge pull request #7976 from subhamkrai/configmap-log-level
ceph: change operator log level dynamically
2021-05-27 10:01:39 +02:00
subhamkrai 0d17dede9c ceph: change operator log level dynamically
earlier, to change the operator log level we need
to change the deployment which requires a restart
the operator pod.

Now, we are changing the log level dynamically
by reading the configmap. For, backward compatibility
we still load from env var.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-05-27 12:40:50 +05:30
Satoru Takeuchi ca9aa1a11c ceph: parse json correctly
radosgw-admin may output logs before and after JSON when this command succeeds. We should
get rid of these logs before unmarshaling output. Although the logs before JSON were
treated in  PR7354, the logs after JSON weren't.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2021-05-27 04:46:13 +00:00
Blaine Gardner 3eb758a174 Merge pull request #7993 from BlaineEXE/update-ceph-images-to-v16.2.4
ceph: update references to v15.2.11 to v16.2.4
2021-05-26 14:21:27 -06:00
Blaine Gardner 285dad339b ceph: update references to v15.2.11 to v16.2.4
Ceph v16 will be the default in Rook v1.7. Update references in the
master branch from v15 (currently v15.2.11) to v16 (currently v16.2.4).

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-05-26 12:30:18 -06:00
Sébastien Han 5346500076 Merge pull request #6868 from Madhu-1/helm-lint
ceph: add github action for helm lint
2021-05-26 11:29:05 +02:00
Madhu Rajanna 3a3bfdefb4 ceph: add github action for helm lint
adding github action for helm lint to
catch the static check errors in helm
charts.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-05-26 14:27:59 +05:30
Travis Nielsen c929cb0536 Merge pull request #7985 from Madhu-1/vr-release-v0.1
ceph: pin volume replication to release-v0.1 branch
2021-05-25 09:25:25 -06:00
Travis Nielsen daf7182d31 Merge pull request #7986 from leseb/drop-mirror-site-name
ceph: remove '--site-name' arg when creating bootstrap peer token
2021-05-25 07:26:45 -06:00
Sébastien Han b13c494fec ceph: remove '--site-name' arg when creating bootstrap peer token
`rbd mirror pool peer bootstrap create` will use cluster fsid by default, so specifying --site-name shouldn't be needed at all.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-05-25 09:00:49 +02:00
Travis Nielsen e1b64e3624 Merge pull request #7945 from subhamkrai/bump-golang1.16
build: bump to golang version 1.16
2021-05-24 23:20:52 -06:00
Madhu Rajanna 95d1bb9184 ceph: pin volume replication to release-v0.1 branch
added volume replication operator release-v0.1
branch to the go.mod as we are doing enhancements to the
volume replicaiton CRDS. Once we have a release will
change this to release-v0.1 branch.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-05-25 10:37:05 +05:30
Travis Nielsen d3c18d001b Merge pull request #7974 from leseb/fix-7963
ceph: do not configure external metric endpoint is not present
2021-05-24 13:56:54 -06:00