Commit Graph
601 Commits
Author SHA1 Message Date
Travis Nielsen 902762364d Merge pull request #5769 from cybozu-go/tests-fix-aws_1.11.x-test-failure
tests: fix aws_1.11.x test failure
2020-07-06 15:47:09 -06:00
Satoru Takeuchi 2cda00345a tests: fix aws_1.11.x test failure
kubelet in aws_1.11.x test requires kubernetes-cni 0.7.5.

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

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-07-07 04:43:45 +09:00
Travis Nielsen dbae36b2bb ceph: update to the latest octopus release
Update the base operator image and cluster examples to use the latest
octopus release v15.2.4. Also cleanup some old examples and unit tests
that were still based on mimic.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-07-06 12:11:47 -06:00
Travis Nielsen 2d793cdc3f ceph: disable ceph mgr test temporarily
Due to an issue in ceph master, the mgr integration test is failing.
Until this is fixed, we will temporarily disable the test. A fix
is expected with https://github.com/ceph/ceph/pull/35915

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-07-06 09:19:41 -06:00
Travis Nielsen 9332d31196 Merge pull request #5755 from travisn/skip-mgr-test-in-master
ceph: Add logging for mgr integration test suite in master
2020-07-06 08:24:31 -06:00
Ahmad Nurus S f7f8270f58 nfs: rewrite nfs operator controller to use controller-runtime
Signed-off-by: Ahmad Nurus S <prksu.sh@gmail.com>
2020-07-03 14:33:25 +07:00
Travis Nielsen 5ec75c16e4 ceph: skip mgr integration test suite in master
The master CI is not expected to run the mgr test suite, which
runs against ceph master.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-07-02 17:00:38 -06:00
Sébastien Han eabedd7f79 Merge pull request #5697 from leseb/rgw-endpoint-healthcheck
ceph: add rgw endpoint healthcheck and external support
2020-07-02 18:30:44 +02:00
Sébastien Han e4eaa91ede ceph: add rgw endpoint healthcheck
We have introduced a new goroutine to check the state of the rgw
endpoint. It will run every minute and perform operations on a bucket.
The success or failure will be reported as part of the status field of
the CephObjectStore CR.

A good status will look like:

status:
  endpointStatus:
    lastChanged: "2020-06-25T13:47:45Z"
    lastChecked: "2020-06-25T13:48:46Z"
  phase: Connected

A failed status:

status:
  endpointStatus:
    details: |-
      error creating bucket "rook-ceph-internal-s3-bucket-checker": RequestError: send request failed
      caused by: Put http://rook-ceph-rgw-my-store.rook-ceph:8080/rook-ceph-internal-s3-bucket-checker: dial tcp 10.108.189.148:8080: connect: connection refused
    health: ERROR

This check works for both converged and external modes. Note that the
CephObjectStore CRD has a new field called "externalRgwEndpoints" which
allows you to define a list of IP addresses pointing to rgws.

Closes: https://github.com/rook/rook/issues/5692
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-07-02 16:34:10 +02:00
Travis Nielsen fec3e02bbd ci: only install newer packages
Skip downgrading the kubernetes-cni, kubectl, or other components

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-07-01 16:59:18 -06:00
Madhu Rajanna 02c9bfe00f ceph: update RBAC required for external-snapshotter
Updated the required RBAC for external-snapshotter
beta to work.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-07-01 07:20:04 +05:30
Travis Nielsen 6c0d4057b3 Merge pull request #5045 from vbnrh/rook-admission-controller
ceph: Adding support for admission controllers
2020-06-25 09:56:39 -06:00
Vineet Badrinath ce1003aef8 ceph: adds scripts and components to support admission controllers
adds deploy.sh script to deploy validatingwebhookconfiguration and create secrets.
adds new command ceph admission-controller to start webhook servers.
adds validation for various rook custom resources

Signed-off-by: Vineet Badrinath <vbadrina@redhat.com>
2020-06-24 14:59:00 +05:30
Satoru Takeuchi c8c05ed7b9 ceph: fix the wrong document of tuneDeviceClass
The tuning parameter of slow device is defined as "tuneDeviceClass".
However, it's written in the document as "tuneSlowDeviceClass".

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-06-24 00:31:14 +00:00
Sébastien Han 1e4a4b477a Merge pull request #5111 from leseb/lang-neutral-ceph
ceph: use octopus base image
2020-06-18 10:46:54 +02:00
Sébastien Han c7f255a0e8 ceph: add the ability to set any pool property
We can now explicitly set any property on a given pool by using the new
Property field in the CephBlockPool Spec.

Also, this fixes the case where both `CephBlockPool` and `CephCluster`
are created at the same time. When Rook creates the pool, the cluster is
still being bootstrapped and the global option
`osd_pool_default_pg_autoscale_mode` has not bee set yet. So the pool
gets created but its `pg_autoscale_mode` property is set to `warn`
instead of `on`.

Closes: https://github.com/rook/rook/issues/5608V
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-06-17 10:08:00 +02:00
Sébastien Han d950f4f823 ci: add more debug
If we cannot get the bucket we need more debug information.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-06-16 10:19:01 +02:00
Travis Nielsen 609d43d050 Merge pull request #5640 from binoue/fix-error-message
ceph: fix error message
2020-06-10 17:24:26 -06:00
binoue b52b59669f ceph: fix error message
This commit fixes an error message

Signed-off-by: binoue <banji-inoue@cybozu.co.jp>
2020-06-11 07:10:29 +09:00
Ali Maredia fc579f4520 ceph: initial commit for ceph rgw multisite resources
This commit contains CR implementations for:
CephObjectRealm
CephObjectZoneGroup
CephObjectZone

Also there are changes made to the objectstore
to add rgws in the object-store to zones and
zone groups in a multisite configuration and
the removal of the --default parameter for any
realms/zonegroups/zones that are created.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2020-06-09 16:28:53 -04:00
Sébastien Han 7fa606b6a7 Merge pull request #5555 from cybozu-go/ceph-fix-regressions-in-the-integration-tests
ceph: fix regressions in the integration tests
2020-05-28 16:48:59 +02:00
Satoru Takeuchi 43296ef36a ceph: make OSD on PVC test work again
OSD on PVC test doesn't work at all because "manual" storage class doesn't
exist here.

It's a regression caused by the following commit.
https://github.com/rook/rook/commit/e96009c26dab8d06e6d3e45efe55b9783028b359

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-05-28 06:18:59 +09:00
Sébastien Han c799e11032 ceph: enhancement cleanup with disks
Now, we can not only cleanup monitor data, logs and crashes but the
disks too. As part of the cleanupPolicy CR spec, we have a new setting
called sanitizeDisks which holds more details:

* confirmation: the confirmation message to sanitize disks,
use "yes-really-sanitize-disks" to confirm

This will **only** wipe the metadata, so it's a fast cleanup allowing
you to re-install later but won't remove all the data from the drive.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-05-27 18:14:02 +02:00
Satoru Takeuchi 206e45facd ceph: fix the wrong condition in the cluster health check
There are the following problems in the cluster health check.

- If the cluster is healthy: Unnecessary long time before exiting from
  the health check loop. The test succeeds thanks to the succeeding
  assertion by luck.
- If the cluster is unhealthy: Exit from the health check loop immediately.
  The test fails in the succeeding assertion by luck too.

It's a regression that is introduced in the following commit.
https://github.com/rook/rook/commit/c0c0dc4ed977a6b373b1884c5b76c9588f0be077

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-05-27 05:20:24 +09:00
Travis Nielsen e1a9a9039b ceph: pool resize test hangs during cleanup
In Octopus 15.2.2 there is an rbd change that causes the rbd ls command
to hang if there are not sufficient OSDs to meet the replica requirement.
The smoke suite just started hanging today since the 15.2.2 image was
released with this change. Therefore, the test that resizes the pool
to replica 3 must resize back to 1 before cleaning up.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-05-19 22:02:37 -06:00
Satoru Takeuchi e96009c26d ceph: prepare PVCs for OSD on PVC test inside the integration test
The PVCs for OSD on PVC test is prepared before running the integration test.
In addition, users are forced to run this script for this by themselves.
To avoid this problem, running this script inside the integration test.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-05-14 05:14:27 +09:00
Satoru Takeuchi abdac2b412 tests: remove the unused fields of a struct
There are the unused fields in `struct CommandArgs`. These can be removed.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-05-13 20:52:54 +09:00
Travis Nielsen b95b89f838 Merge pull request #4913 from jmolmo/mgr_integration_tests
Ceph: manager integration tests
2020-05-11 09:19:29 -06:00
Haichao Li 063558d2c3 tests: Kubeadm add the makeTestImages tag of arm64
Kubeadm add the makeTestImages tag of arm64

Signed-off-by: Haichao Li <haichao.li@arm.com>
2020-05-08 09:50:19 +08:00
Sébastien Han cecbfcfba6 Merge pull request #5372 from leseb/obc-independent-mode
ceph: add support for OBC on external cluster
2020-05-06 10:30:15 +02:00
Satoru Takeuchi 22c5743656 cleanup: remove the descriptions of directory-based OSD
Directory-based OSD is not supported in v1.3.0 anymore. Let's remove
the descriptions of this feature. As an exception, it should still
be in the manifests of v1.2.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-05-06 00:44:31 +09:00
Satoru Takeuchi 5fc69b9e49 tests: add a note to the possibility of downgrading some deb packages
We should write down that kubeadm.sh may downgrade some deb packages.
Although it's clear that this script installs some K8s related packages,
downgrading packages are not so.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-05-05 23:17:43 +09:00
Satoru Takeuchi c0c0dc4ed9 tests: return bool if the functions are prefixed by "Is"
There are several functions that are prefixed by "Is" and return
just error. It's straightfoward to return bool to make the meaning
of these functions clearer.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-05-05 22:55:01 +09:00
Sébastien Han b86bb9c528 ceph: add support for OBC on external cluster
We can now consume an external s3 endpoint which is not managed by Rook.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-05-04 18:14:26 +02:00
Juan Miguel Olmo Martínez 4b492e6f39 ceph: manager integration tests
Ceph orchestrator device ls
Ceph orchestrator status
Ceph orchestrator host ls
Ceph orchestrator create OSD
Ceph orchestrator ls

[test ceph]

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
2020-05-04 11:32:56 +02:00
Blaine Gardner 2bf340ff0b ceph: append 00 to rook-privileged PSP name
Adding seccomp annotations to the PSP has made Kubernetes start choosing
the recommended Kubernetes "default" PSP over the Rook privileged PSP,
causing operator start errors. Append 00 (double zero) to the beginning
of the PSP name to make sure it is one of the first PSPs checked by
Kubernetes and will be matched before the "default" one.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2020-04-24 10:21:19 -06:00
binoue 18cde4596c ceph: update helm chart manifests
Currently, helm chart is little outdated and has differences with
example/common.yaml.
This commit modifies both manifests to use same resources.

Signed-off-by: binoue <banji-inoue@cybozu.co.jp>
2020-04-23 14:21:32 +09:00
Travis Nielsen 8d72e788c1 ceph: lookup of the cluster cannot rely on namespace name
The name of a CephCluster is commonly the same as the namespace,
but not always. When looking up the ceph cluster we can look for
the first one in the namespace rather than requiring the name
to be the same as the namespace.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-04-22 13:42:40 -06:00
Sébastien Han 7c994441c3 ceph: make admin key optional for external cluster
Currently, we need to configure the Ceph external Admin keyi
in the Rook deployment to be able to connect to an external Ceph cluster.
If we wanted to run in a multi-tenant fashion
were several K8s/Rook clusters wanted to connect to the same external ceph cluster,
each K8s deployment would have the access to the External Ceph Admin key
and could potentially access or delete the Data
from pools that belong to other k8s/Rook Clusters.

Now the admin key is optional but the helper script create-external-cluster-resources.sh
will help create the necessary keys/users to connect to that cluster.

Closes: https://github.com/rook/rook/issues/4917 and https://github.com/rook/rook/pull/5227
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-04-20 09:59:04 +02:00
Satoru Takeuchi a860aa445e ceph: describe the desired kernel version in the integration test
The integration test certainly fails with linux kernel v4.4.x, the default
kernel of Ubuntu 16.04. It succeeds with the linux kernel v4.8.x that can be
got by apt-get. Let's declare this as the desired version.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-04-17 23:24:03 +09:00
Satoru Takeuchi bf27b0f5c4 ceph: allow to set the device for OSD in the integration test
The device name for OSD is fixed to /dev/xvdc. It works fine in the CI.
However, the name would be different in the developer's local environment.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-04-17 23:24:03 +09:00
Travis Nielsen b465ad4cc2 Merge pull request #5269 from jmolmo/testcluster_refactor
ceph: refactor <StartTestCluster>
2020-04-16 23:23:21 -06:00
Travis Nielsen 1c1591c847 Merge pull request #5261 from cybozu-go/missing-requiresafereplicasize
Ceph: Add requireSafeReplicaSize in CephObjectStore CRD
2020-04-16 10:44:46 -06:00
Travis Nielsen 566530e90e Merge pull request #5263 from surajssd/surajssd/add-seccomp-annotation-to-psp
PSP: Add seccomp annotations
2020-04-16 08:48:23 -06:00
Juan Miguel Olmo Martínez 28afede309 ceph: refactor <StartTestCluster>
Refactor the StartTestCluster method to make it more readable.

I have put most of the parameters used in this function in the struct.
In this way the call to this function is more easy to understand and to use.
The addition of new parameters to this method started to be annoying.

[test ceph]

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
2020-04-16 12:03:45 +02:00
zoetrope babb55cc15 ceph: add requireSafeReplicaSize to CRD
add requireSafeReplicaSize field to CRD in upgrade-from-v1.2-crds.yaml and ceph_manifets.go

Signed-off-by: zoetrope <a.ikezoe@gmail.com>
2020-04-16 15:18:00 +09:00
Satoru Takeuchi 76a2b8c230 tests: prevent the installation failure due to downgrade packages
kubeadm installer tries to install the fixed versions of some packages.
So if the newer versions are already installed, this script fails.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-04-16 09:18:49 +09:00
Satoru Takeuchi ddf02d3032 tests: make swapon and swapoff reliable
After running `swapoff -a`, systemd re-enable swap soon.
We should stop the corresponding unit to avoid this problem.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-04-16 09:18:49 +09:00
Suraj Deshmukh 2f6205b2f6 PSP: Add seccomp annotations
This commit adds seccomp annotations to the PSP shipped with Rook
Operator. In this way the operator when deployed will be more secure and
will only be allowed the syscalls defined the runtime's seccomp profile.

Signed-off-by: Suraj Deshmukh <surajd.service@gmail.com>
2020-04-15 20:10:30 +05:30
Sébastien Han 2bd017102b ci: add retry when deleting rbd image
Sometimes the image still has watchers so let's retry the deletion.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-04-15 09:12:57 +02:00