Commit Graph
209 Commits
Author SHA1 Message Date
rohan47andAshish Ranjan d2f52aebe5 Adds support for storageClassDeviceSet in rook-ceph operator
- Added code to support StorageClassDeviceSet spec provided in the cluster-on-pvc.yaml
- The code reads the StorageClassDeviceSet spec and creates pvc based on the ‘count’ field for each device set.
- OSD prepare job is started for each PVC which activates the ceph-volume on each PVC
- Finally OSD is started on each of the PVC device.

Co-authored-by: rohan47 <rohgupta@redhat.com>
Co-authored-by: Ashish Ranjan <aranjan@redhat.com>
Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2019-08-12 09:24:13 -06:00
travisn 1d22146080 add CephCluster RBAC to the osd service account
In order for the osd service account to reference the
cephcluster CR in the owner references, OpenShift requires
access to the CephCluster CRD. This adds the minimal changes
needed to appease OpenShift.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-08-07 11:59:52 -06:00
travisn 0a3fbf62f3 enable the ceph-csi driver by default
CSI is now the preferred storage driver for Rook.
By default both the CSI and flex drivers will be started
by the operator. In a future release the flex driver
will be deprecated, but for now is still supported.

The drivers can be disabled with an environment
variable in the operator deployment in operator.yaml.
If users are only using one driver or the other there is
no need to enable both drivers.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-08-07 10:00:41 -06:00
travisn 1598a048a1 tests: collect all logs for pods in the test namespaces
Now we collect logs for all pods and all their init and main
containers during the integration tests. No longer will we be
missing logs from the integration tests as long as the pods
are available when they are collected at the end of the test.
The pod descriptions are also written to a log file instead
of being included inline with the test output.

Signed-off-by: travisn <tnielsen@redhat.com>
(cherry picked from commit 6e0bc338f90b3f36a89cf37b542ff4ff873b70bd)
2019-08-02 11:10:46 -06:00
Madhu Rajanna f95929da16 update csi template
ceph-csi https://github.com/ceph/ceph-csi/pull/457

made deployment template changes and also
removed node publish secrets and added not
stage secrets.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-07-24 22:27:56 +05:30
travisn be8a25e07e trigger the integration tests for all branches if tags not set
The integration tests for storage providers will be skipped
for example if [test ceph] is specified. If the [test] tag
is not specified, all tests should be run. If the tag is not
specified, the Jenkinsfile will pass null, which needs to be
handled by the test code deciding to run all the tests.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-07-23 10:53:22 -06:00
Sébastien Han 41d2953e7e ceph: use latest 14.2.2 code
14.2.2 is out and along with it numerous fixes so let's use it.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-07-22 15:58:25 +02:00
Blaine Gardner f54dcbb5f5 ceph integration: add psp to integration tests
Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-07-18 14:52:39 -06:00
travisn d40e490444 allow executing tests specific to a storage provider
Since most PRs are focused on a single storage provider,
the tests for other storage providers do not need to be
run. The CI will allow skipping tests for other storage
providers by specifying keywords in the PR description.
Similar to [skip ci], you can now specify [test storage-provider].
For example, [test ceph] will only trigger the test
suites for ceph and none of the other storage providers.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-07-17 23:29:52 -06:00
Anton Skriptsov aea098b8b5 Add/remove nodes via EdgeFS cluster' CRD
Signed-off-by: Anton Skriptsov <sabbotagge@gmail.com>
2019-07-17 09:09:52 -07:00
Sébastien Han 40d37a165f test framework: collect logs earlier
Logs will be lost if we collect them after pods are uninstalled.
So we need to collect them before purging.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-07-17 00:39:18 +02:00
Blaine Gardner 5fc99a6266 Merge pull request #3369 from SUSE/cmd-reporter
Add cmd-reporter daemon; use it to get ceph version
2019-07-11 16:05:14 -06:00
travisn ef9dc0be74 tests: ensure cluster does not exist before starting a test
The CI instances are not always being properly cleaned up
between runs. This is an attempt to get the tests
to ensure a clean install before proceeding with the test.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-07-05 16:41:52 -06:00
Blaine Gardner 2ef83c4027 ceph: use cmd-reporter for ceph version job
Use cmd-reporter to detect Ceph version.

The job to detect Ceph version needs to run in a security account context
capable of getting/creating ConfigMaps, so a new security account, role,
and role binding are created for the cmd-runner jobs. In the future, the
Ceph mgr may create jobs in this service account for running
`ceph-volume` on nodes, and this also keeps Rook operators controlling
multiple Ceph clusters independent.

Fixes #2686 - ceph version job not working correctly with graylog

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-07-05 15:37:14 -06:00
Travis Nielsen 0f699aa33c Merge pull request #3377 from poornimag/fork-ceph-image-latest
Change the ceph image to point to latest-nautilus-devel
2019-07-05 08:42:05 -06:00
Poornima G 4ddef3e823 Change the ceph image to latest-nautlius-devel
Currently in cluster deploy, ceph image points to ceph/ceph:v14.2.1-20190430.
Changing this to use ceph/daemon-base:latest-nautilus-devel as its the latest nautilus.

Ceph nautilus has some changes in cephsfs mgr module, which is required by ceph-csi
canary image, without which the create/purge of RWX PVCs will fail. These changes
are not yet part of any released ceph version, i.e v14.2.1-20190430. Even in the
short future, we expect some changes to land in Nautilus after 14.2.2, hence
waiting for 14.2.2 release and updating to it, will not solve the issue.
Therefore using latest-nautilus-devel, which will always have the changes
required by ceph-csi. This is only a temperory change in the master, until
14.2.3 is released.

Signed-off-by: Poornima G <pgurusid@redhat.com>
2019-07-05 06:50:30 +00:00
ShyamsundarR 1dbdd9bb12 Update Ceph-CSI manifests as per changes to ceph-csi repository
Ceph-CSI repository had a recent PR [1] merged that contains
changes to the pod manifests.

This PR to Rook updates the pod manifests to catchup with the
changes to Ceph-CSI master.

Once Ceph-CSI has a 1.1.0 release, future PRs to Rook on manifest
changes would track that branch (at least for Rook 1.1 release).

[1] PR in ceph-csi changing the manifest:
  https://github.com/ceph/ceph-csi/pull/443

Signed-off-by: ShyamsundarR <srangana@redhat.com>
2019-07-01 13:30:23 -04:00
Sébastien Han e6093d2c83 Merge pull request #3196 from travisn/upgrade-1.0
Ceph: upgrade test from 1.0 to master instead of 0.9 to master
2019-06-25 17:48:31 +02:00
Madhu Rajanna 71f369303e update rook to use ceph-csi canary version
ceph-csi canary version is close to ceph-csi v1.1.0
release

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-06-25 17:15:46 +05:30
travisn c0d6f6edf2 ceph: upgrade test from 1.0 to master
The upgrade test is intended to upgrade from the previous release to the latest.
Given the 1.0 release recently, the upgrade test will now be from 1.0 to
master. There is no longer a need in master to upgrade from 0.9.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-06-24 15:05:48 -06:00
Madhu Rajanna 64f063fb69 update code for cephfs-csi
add test cases to test cephfs csi
update ceph-csi document

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-05-09 20:04:06 +05:30
Madhu Rajanna d9a5dc81e7 deploy attacher container for cephfs csi
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-05-08 12:43:14 +05:30
Santosh Pillai d6f63166a0 Optionally collect all CI logs using [all logs] flag
Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2019-05-03 12:46:18 +05:30
Alexander Trost 5aea23aea5 Add optional containers count for restore/zap option (#3088)
Add optional containers count for restore/zap option
2019-05-01 23:40:00 +02:00
Anton Skriptsov 1db2da74a7 Add container count for restore option
Signed-off-by: Anton Skriptsov <sabbotagge@gmail.com>
2019-05-01 13:14:56 -07:00
travisn 642a8c67a1 ceph: update tests and examples to nautilus 14.2.1
Signed-off-by: travisn <tnielsen@redhat.com>
2019-05-01 08:49:55 -06:00
Ashish Ranjan dac028ab24 enhance(nfs): remove one to one mapping for nfs provisioner
Signed-off-by: Ashish Ranjan <ashishranjan738@gmail.com>

This commit removes one to one mapping of NFS provisioner and adds a dedicated provisioner for nfs.
2019-04-26 20:52:30 +05:30
Ashish Ranjan 9f3debc53f refactor(nfs,provisioning): move claimPath info from annotation to parameters
Signed-off-by: Ashish Ranjan <ashishranjan738@gmail.com>

This commit moves claimPath information from annotation to parameters and adds option to enable/disable storageclass creation.
2019-04-26 04:25:49 +05:30
Ashish Ranjan 23efbf658b enhance(NFS): adds dynamic provisoning for nfs
Signed-off-by: Ashish Ranjan <ashishranjan738@gmail.com>

This commit adds dynamic provisioning for nfs
2019-04-26 04:25:49 +05:30
Anton Skriptsov a9c3e00c2d Edgefs v1beta1 CI tests
Signed-off-by: Anton Skriptsov <sabbotagge@gmail.com>
2019-04-24 16:35:07 -07:00
travisn ecdb55b2be ceph: correct code generation for plural CephNFSes
Signed-off-by: travisn <tnielsen@redhat.com>
2019-04-23 13:36:45 -06:00
Blaine Gardner 2bf7259c08 ceph integration test: rm replicasets permission
I modified but missed saving this change intended to go into PR #3009.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-04-18 10:53:34 -06:00
travisn bc87b440fb update to the k8s 1.14 client libraries
Signed-off-by: travisn <tnielsen@redhat.com>
2019-04-18 07:51:41 -06:00
travisn 91e9a5cd04 reference K8s1.13 and client-go 1.10 and the external provisioner for flex
Signed-off-by: travisn <tnielsen@redhat.com>
2019-04-18 07:51:41 -06:00
travisn b8ab35e6c5 tests: collect the operator log prior to a pod restart
Signed-off-by: travisn <tnielsen@redhat.com>
2019-04-17 22:21:53 -06:00
travisn b89c6a2d73 helm: add the cephnfs crd to the helm chart
Signed-off-by: travisn <tnielsen@redhat.com>
2019-04-17 22:21:53 -06:00
Kaushal M 2e274b306a ceph: Use aggregated ClusterRoles
The ClusterRoles in the manifests (and helm chart) for the ceph provider
have been updated to use [aggregated ClusterRoles][1].

All ClusterRoles have been split into 2 ClusterRoles.
An aggregated ClusterRole without any rules, named the same, but with an
aggregationRule that matches labels in the format
'rbac.ceph.rook.io/aggregate-to-<ClusterRole name>: "true"'.
A second ClusterRole which contains the existing rules named
'<ClusterRole name>-rules', with label
'rbac.ceph.rook.io/aggregate-to-<ClusterRole name>: "true"'.

These two ClusterRoles give the same behaviour as the previous
ClusterRole.

Additional rules to a ClusterRole can now be provided by creating a new
ClusterRole with the correct label. This should help make updates
simpler.

Fixes #2634.

[1]: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#aggregated-clusterroles

Signed-off-by: Kaushal M <kshlmster@gmail.com>
2019-04-17 13:00:21 +05:30
Alexander Trost 8bc26d9096 k8sclient: Update all operators to use apps/v1
All usages of k8s go client are now also using the versioned `AppsV1() `
call for the client.

Updated MySQL and Wordpress, and Kube Registy examples to use apps/v1
Deployments.

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2019-04-12 09:25:42 +02:00
travisn 5ebb651e37 ceph: update the cephcluster custom resource with ceph health
The CephCluster resource will now expose the health of the ceph cluster
so admins can query the status with k8s api or kubectl instead of
needing to run the rook toolbox. The operator will query the
ceph status periodically and update the status in the custom resource.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-04-10 14:41:18 -06:00
Travis Nielsen e0d3ffdceb Merge pull request #2839 from Madhu-1/fix-drivername
Fix driver name in ceph csi driver
2019-04-10 08:51:06 -06:00
Madhu Rajanna d9dd81396c remove attacher statefulset for rbd csi driver
deploy attacher as a container inside  rbd provisioner
stateful set

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-04-10 18:27:08 +05:30
Travis Nielsen 2ca611a1bd Merge pull request #2940 from travisn/nautilus-support
Add nautilus to the list of supported Ceph versions
2019-04-09 21:53:14 -06:00
Madhu Rajanna 38527239c4 simplify socker directory name inside container
socket directory name need not follow
the driver name format,renamed socket directory
to simple names.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-04-09 16:08:56 +05:30
Travis Nielsen 1d98c47315 Merge pull request #2931 from sabbot/integration-test
Edgefs: Integration tests for EdgeFS
2019-04-08 20:01:40 -06:00
Anton Skriptsov 15a3a26b08 Integration tests for EdgeFS
Signed-off-by: Anton Skriptsov <sabbotagge@gmail.com>
2019-04-08 05:00:01 -07:00
travisn 1f91eda58c ceph: add nautilus to the list of supported versions
Signed-off-by: travisn <tnielsen@redhat.com>
2019-04-07 00:03:29 -06:00
Keith Schincke 878ef8ff00 Issue 2660: Deleting CephObjectStoreUser does not delete secret
When deleting a CephObjectStoreUser the deleteUser function
attempts to delete the stored secret using the wrong name. This
patch updates deleteUser to use the same fmt.Sprintf call used in
the createUser function.

Updated CI to delete the correct CRD and check the secret is deleted.

Signed-off-by: Keith Schincke <keith.schincke@gmail.com>
2019-04-05 10:52:15 -05:00
travisn aa8b9d7b9d helm test charts skip the role creation since included in the chart
Signed-off-by: travisn <tnielsen@redhat.com>
2019-04-04 12:42:08 -06:00
travisn ceb2be1aca refactor the ceph cluster crd and related example yamls
The RBAC is tedious to copy everywhere with the cluster.yaml and is confusing to newcomers.
The common resources are now factored into the operator-common.yaml for the common scenario
of creating a single cluster. Examples are now added for configuration of the operator
and cluster crds to provide a more complete set.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-04-04 12:42:07 -06:00
travisn 531da9647c ceph: rely on ceph image creation success instead of rbd get info
Nautilus has an issue targeting Luminous when running the rbd info command.
Rook already has the info it needs for the call and can return it
after the rbd create command succeeds.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-03-20 15:15:36 -06:00