Commit Graph
7961 Commits
Author SHA1 Message Date
Madhu Rajanna c335414f58 ceph: correct enableCSIHostNetwork in helm charts
enableCSIHostNetwork was missing in the helm charts
values.yaml example. adding the same in this commit.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-06-08 15:48:24 +05:30
Travis Nielsen 1789eda40f Merge pull request #8063 from rohan47/multus
ceph: removes experimental for multus in cluster.yaml
2021-06-07 15:38:31 -06:00
rohan47 68265202c7 ceph: removes experimental for multus in cluster.yaml
removed the word EXPERIMENTAL from multus section in cluster.yaml

Signed-off-by: rohan47 <rohgupta@redhat.com>
2021-06-08 02:42:56 +05:30
Travis Nielsen 32e9c4a3ab Merge pull request #8056 from travisn/jenkins-disabled
Disable the Jenkins build in master by default
2021-06-07 10:57:56 -06:00
Travis Nielsen d56f59fcf7 build: disable all Jenkins builds in master except for [test full]
The github actions are fully covering the build needs in master
so we can go ahead and disable Jenkins by default. In case
there is still a desired to run Jenkins for a particular PR,
the [test full] text can still trigger it.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-06-07 09:17:24 -06:00
Travis Nielsen d741885474 docs: remove obsolete build instructions
Given the improvements with github actions and other improvements,
we now clean up the build instructions for developers joining the
rook project. There is no need to understand about Jenkins pipelines
anymore since we will soon be fully on github actions.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-06-04 13:45:01 -06:00
Travis Nielsen 3b10a21d5d Merge pull request #8040 from travisn/doc-recovery-cluster-deletion
Add a disaster recovery guide for deleted cephcluster
2021-06-03 16:19:28 -06:00
Travis Nielsen 5e86ef8b0c docs: clarify not to change crdsenabled in helm chart
Changing the crds.enabled setting in a running cluster will cause the
CRs to be deleted, which could be disastrous for a cluster. Add
and clarify the warning in the docs to prevent it and link
to recovery steps if it does happen.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-06-03 14:04:47 -06:00
Travis Nielsen abdaab1a75 docs: disaster recovery guide for deleted cephcluster
If the CephCluster CR or other CRs are mistakenly deleted,
the cluster can remain intact with steps to remove the owner
references to the cluster and re-creating the CRs.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-06-03 12:00:59 -06:00
Travis Nielsen b059cb9c75 Merge pull request #8017 from sp98/update-ceph-teardown-doc
docs: update ceph-teardown doc
2021-06-03 11:48:22 -06:00
Travis Nielsen a8764a6df1 Merge pull request #8043 from Rakshith-R/cleanup-csi-statefulset
ceph: remove obsolete statefulset functions
2021-06-03 11:06:49 -06:00
Travis Nielsen b61fe3dbe1 Merge pull request #8047 from leseb/fix-available-dev
ceph: always skip disks with filesystem
2021-06-03 07:12:41 -06:00
Travis Nielsen 162496c760 Merge pull request #8042 from leseb/fix-external-mode-upgrade
ceph: fix external cluster upgrade
2021-06-03 07:09:21 -06:00
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
Sébastien Han d764af8d11 ceph: fix external cluster upgrade
Both MonSpec.Count and CephVersionSpec.Image should be optional for the
external cluster. So marking them as so.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-06-03 12:13:57 +02:00
Rakshith R 35a9612041 ceph: remove obsolete statefulset functions
This commit removes obsolete statefulset create, delete,
addlabel, templateToStatefulset functions which were part of
deprecated csi support for k8s 1.13 and should have been
removed as part of https://github.com/rook/rook/pull/5982.
It also adds Unit test for templateToDeployment func.

Signed-off-by: Rakshith R <rar@redhat.com>
2021-06-03 15:36:25 +05:30
Santosh Pillai 2ed122bc57 docs: update ceph-teardown doc
update ceph teardown doc to include cleanupPolicy which enables automatic clean up of the dataDirHostPath and the drives

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2021-06-03 11:32:14 +05:30
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