Commit Graph
1001 Commits
Author SHA1 Message Date
Jiffin Tony Thottan 3cacd8db32 test: add seperate test for rgw vault integration
RGW supports only v2 version of kv engine, current integration test is written for kv v1,
hence seperating existing test into two.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2021-04-28 14:40:08 +05:30
subhamkrai 7974d46b20 ci: improve github action writing
we have lots of duplicate codes for
github action. this commit refactor
them to a bash script which will minimize
duplicate codes.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-04-27 20:15:52 +05:30
Sébastien Han 6a97721576 ci: use latest pacific for mirroring test
So we can get https://github.com/ceph/ceph/pull/40985 and have a more
stable CI. Once v16.2.2 is released we can revert this.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-04-22 18:30:05 +02:00
Sébastien Han a9641a9355 Merge pull request #7716 from leseb/debug-cii
ci: mitigate block locking issues and flapping mirroring test
2021-04-22 15:38:59 +02:00
Sébastien Hanandsubhamkrai srai@redhat.com a59df3c4dd ci: add missing variable to the release/master action
The UDEV rule was missing the device to apply the rule out.

Co-authored-by: subhamkrai srai@redhat.com
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-04-22 14:07:46 +02:00
Sébastien Han 77be184f13 ci: wait a bit longer for the mirroring to happen
30sec was not enough see:

```
  # let's wait a bit for the image to be present
  timeout 30 sh -c 'until [ "$(kubectl exec -n rook-ceph-secondary deploy/rook-ceph-tools -t -- rbd -p replicapool ls|grep -c test)" -eq 1 ]; do echo "waiting for image to be mirrored" && sleep 1; done'
  shell: /bin/bash -e {0}
  env:
    GOROOT: /opt/hostedtoolcache/go/1.16.3/x64
    MINIKUBE_HOME: /home/runner/work/_temp
unable to get monitor info from DNS SRV with service name: ceph-mon
rbd: couldn't connect to the cluster!
rbd: listing images failed: (2) No such file or directory
2021-04-22T08:17:47.053+0000 7f824b13e2c0 -1 failed for service _ceph-mon._tcp
2021-04-22T08:17:47.053+0000 7f824b13e2c0 -1 monclient: get_monmap_and_config cannot identify monitors to contact
command terminated with exit code 2
waiting for image to be mirrored
unable to get monitor info from DNS SRV with service name: ceph-mon
rbd: couldn't connect to the cluster!
rbd: listing images failed: (2) No such file or directory
2021-04-22T08:17:48.317+0000 7f31f6d372c0 -1 failed for service _ceph-mon._tcp
2021-04-22T08:17:48.317+0000 7f31f6d372c0 -1 monclient: get_monmap_and_config cannot identify monitors to contact
command terminated with exit code 2
waiting for image to be mirrored
unable to get monitor info from DNS SRV with service name: ceph-mon
rbd: couldn't connect to the cluster!
rbd: listing images failed: (2) No such file or directory
2021-04-22T08:17:49.597+0000 7fa3a2ac52c0 -1 failed for service _ceph-mon._tcp
2021-04-22T08:17:49.597+0000 7fa3a2ac52c0 -1 monclient: get_monmap_and_config cannot identify monitors to contact
command terminated with exit code 2
waiting for image to be mirrored
unable to get monitor info from DNS SRV with service name: ceph-mon
rbd: couldn't connect to the cluster!
rbd: listing images failed: (2) No such file or directory
2021-04-22T08:17:50.873+0000 7fab17fb12c0 -1 failed for service _ceph-mon._tcp
2021-04-22T08:17:50.873+0000 7fab17fb12c0 -1 monclient: get_monmap_and_config cannot identify monitors to contact
command terminated with exit code 2
waiting for image to be mirrored
unable to get monitor info from DNS SRV with service name: ceph-mon
rbd: couldn't connect to the cluster!
rbd: listing images failed: (2) No such file or directory
2021-04-22T08:17:52.169+0000 7f944f52f2c0 -1 failed for service _ceph-mon._tcp
2021-04-22T08:17:52.169+0000 7f944f52f2c0 -1 monclient: get_monmap_and_config cannot identify monitors to contact
command terminated with exit code 2
waiting for image to be mirrored
waiting for image to be mirrored
waiting for image to be mirrored
waiting for image to be mirrored
waiting for image to be mirrored
waiting for image to be mirrored
waiting for image to be mirrored
waiting for image to be mirrored
waiting for image to be mirrored
waiting for image to be mirrored
waiting for image to be mirrored
waiting for image to be mirrored
waiting for image to be mirrored
waiting for image to be mirrored
waiting for image to be mirrored
waiting for image to be mirrored
waiting for image to be mirrored
waiting for image to be mirrored
waiting for image to be mirrored
Error: Process completed with exit code 124.
```

However, when logging into the runner, the image was replicated.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-04-22 11:30:16 +02:00
Sébastien Han 834e5b2685 ci: let master/release runners alive on failure
If some jobs from master/release branches fail then we keep the runner
alive so we can debug it.
By default, runners will naturally timeout after 6 hours. See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-04-21 18:36:12 +02:00
Satoru Takeuchi 957465af88 ceph: prevent disk flapping problem in master
We resolved disk flapping problem (#7405) with #7467. However, this fix
was not applied to integration test in master.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2021-04-21 04:10:09 +00:00
Travis Nielsen 8c1ac86325 Merge pull request #7691 from leseb/macos-build
ci: build and run various make commands on MacOS
2021-04-20 10:36:42 -06:00
Travis Nielsen f6984255fc Merge pull request #7680 from subhamkrai/fix-build
ci: make build not failing
2021-04-20 09:46:46 -06:00
Sébastien Han 57131e1a90 ci: build and run various make commands on MacOS
Introducing a small action on MacOS to help us catch errors with various
'make' command on OSX, most notably 'sed' versus 'gnu-sed'.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-04-20 17:21:08 +02:00
Sébastien Han 2b87efef89 ci: add missing condition for action
Let's skip multi-cluster-mirroring if skip-ci label is set.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-04-20 17:21:08 +02:00
Sébastien Han 1028cd41f9 Merge pull request #7623 from leseb/add-rbd-mirroring-ci
ci: add rbd-mirror integration test
2021-04-20 16:53:59 +02:00
Sébastien Han 9a28e130b6 ci: add rbd-mirror integration test
Long due but finally there, the CI now test the block mirroring between
2 clusters.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-04-20 16:27:53 +02:00
subhamkrai 9305f12ecf ci: make build not failing
currently, the build action is not failing if there
is/are any modified files after the build. this commit
will validate build with `git status` after `make build`
command will fail if any changed file found.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-04-20 13:10:33 +05:30
Sébastien Han 6a33395c4a ci: separate PR and release/master branch push into different files
We now have a single file with all the integration test that will run
when code is pushed to a release branch or merged in master.

Also, we have separate files with integration tests that run on pull
requests against master or a release branch.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-04-19 12:43:31 +02:00
Sébastien Han 5a7f405010 ci: remove the build action
This action is not needed anymore since other actions build already.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-04-19 12:41:47 +02:00
Sébastien Han aecec6f870 ci: only run cassandra job on cassandra code
Only run the cassandra integration if the PR involves cassandra, has the
"cassandra" label on it.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-04-19 12:41:47 +02:00
Blaine Gardner a818a01a13 test: do not allow go.test parallel dependencies
Dependencies for `make go.test` have to run in order, so call them
explicitly from the target rather than allowing them to be done in
parallel if `make -j` flag is used.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-04-16 12:24:39 -06:00
Yannis Zarkadas e3c747db47 test: add GitHub Action for Cassandra integration test
Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com>
2021-04-14 22:03:02 +03:00
Sébastien Han 01ad7afe53 ci: ability to skip ci with a label
Additionally to skip ci tag in the commit message from https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci/
We can now skip integration tests by applying the "skip-ci" label at the
**creation time** of the PR. Obviously adding later works but will still
trigger the test in the initial opening of the PR. Subsequent pushes
will skip integration tests.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-04-14 12:17:34 +02:00
Travis Nielsen 10f350adc9 Merge pull request #7371 from travisn/go-1.16
build: Update the build to use go 1.16 while still supporting 1.15
2021-04-13 07:33:19 -06:00
Travis Nielsen 31c4ef622e build: update the build to use go 1.16
With the release of go 1.16, we update the tools. The -i flag is
now deprecated, no longer necessary for building in a private directory.
The go modules are cleaned up at the same time.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-04-12 15:01:14 -06:00
Travis Nielsen bfa302f2c2 ci: run integration tests on k8s 1.21
With the release of K8s 1.21.0 we now run the integration tests
on v1.21.0. To keep consistent with running master builds on five
recent releases, we keep master builds back to v1.15 and skip other
less changed versions such as v1.16 and 1.19. Jenkins builds just run
five versions, while github actions run four versions.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-04-12 13:10:43 -06:00
Sébastien Han 89f4c4a81a ci: always run golangci-lint
This action wasn't not running on release branch. Now enabling it.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-04-12 17:37:59 +02:00
Sébastien Han 15901277d5 ci: use authenticated requests for minikube action on suite
We have seen the CI failing to run the minikube action, reaching the API
limit. By using authenticated requests, we can overcome this limitation.
Follow-up of https://github.com/rook/rook/pull/7503/commits/1504fb869b5ed5b8f7df362bc9df3b45dd8ac9ea

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-04-12 14:26:38 +02:00
subhamkrai 81624b255f ci: update minikube version
this commit update the github action
minikube version as minikube setup on
latest k8s version are failing.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-04-08 12:32:04 +05:30
subhamkrai 20ab5befb0 ci: enable mgr suite for PR only
this commit enable mgr suite to run only
for PRs.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-04-07 11:34:41 +05:30
subhamkrai 24ec105b58 ci: enable it test on push
this commit enable IT test to run on master push.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-04-07 11:32:42 +05:30
Sébastien Han 350379d43e ci: always run crd gen
Always run crd-gen so we can catch issues even if no go code was
modified.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-04-06 14:12:58 +02:00
Sébastien Han d6caae5004 Merge pull request #7503 from leseb/action-auth
ci: use authenticated requests for minikube action
2021-03-30 15:00:11 +02:00
Sébastien Han 1504fb869b ci: use authenticated requests for minikube action
We have seen the CI failing to run the minikube action, reaching the API
limit. By using authenticated requests, we can overcome this limitation.

Closes: https://github.com/rook/rook/issues/7482
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-30 14:46:40 +02:00
Blaine Gardner 660d2fe442 Merge pull request #7493 from BlaineEXE/codespell-tidy
test: document or clean up codespell flags
2021-03-29 10:07:53 -06:00
Blaine Gardner 71c41180be test: document or clean up codespell flags
Document codespell flags that are necessary. Remove codespell flags with
minor code changes if possible.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-03-26 15:00:49 -06:00
Sébastien Han cf00a86fc2 ceph: force yq and controller-gen versions
Let's not use any controllen-gen version we might find on the system,
always pull the version we need.
Same goes for yq.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-26 09:21:33 +01:00
Sébastien Han eac743ffc7 ceph: shorten make crds
Let's use "makge crds" instead of "make crds-gen", it's shorter and
simplier to remember.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-26 09:08:46 +01:00
Sébastien Han 7069aa4f16 ci: fix disk issue with crashing osd
Let's try to create a 'ceph' user with the uid 167 and add it to the
'disk' group so that if the permissions on the disk change then the OSD
should be able to access the disk.

Closes: https://github.com/rook/rook/issues/7405
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-25 09:55:35 +01:00
Sébastien Han 89e57dc807 Merge pull request #7051 from subhamkrai/gh-action-matrix
ci: it test to run on multiple k8s version for master/release
2021-03-24 14:46:27 +01:00
Sébastien Han 3f6257c751 Merge pull request #7431 from subhamkrai/yamllint-silence-warning
ci: silence yamllint warnings
2021-03-22 11:31:12 +01:00
subhamkrai 61ba7ec45a ci: it test to run on multiple k8s version for master/release
this commit enables IT to run on multiple k8s version
and for master/release, all the 5 k8s version
'v1.15.12','v1.16.15','v1.18.15','v1.19.7','v1.20.0'
similar to jenkins.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-03-22 15:55:01 +05:30
subhamkrai 378c1c8506 ci: silence yamllint warnings
this commit silence yamllint warnings

Signed-off-by: subhamkrai <srai@redhat.com>
2021-03-18 15:38:01 +05:30
Sébastien Han c43058a98c Merge pull request #7355 from leseb/more-disks-ci
ceph: add more osds to the ci
2021-03-18 10:56:19 +01:00
subhamkrai 07df8220d8 ci: run gh action on multiple k8s version
this commit enables gh action to run

Flex test on only 'v1.15.12',
Smoke and Helm tests on both 'v1.15.12','v1.20.2',
Mgr, Multicluster and upgrade tests on only 'v1.20.2'

Signed-off-by: subhamkrai <srai@redhat.com>
2021-03-18 09:03:56 +05:30
Travis Nielsen bdbf264e68 ceph: integration tests in github actions skip cleanup
The integration tests run independently in the github actions so there is
no need to cleanup from every test. The cleanup is still needed in the
Jenkins tests where all the suites run serially.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-03-17 11:26:11 -06:00
Travis Nielsen 32c628108c Merge pull request #7416 from leseb/debug-ci
ci: debug runners on failures
2021-03-16 08:57:32 -06:00
Sébastien Han ab50e75e08 Merge pull request #7402 from subhamkrai/yaml-ignore
ceph: ignore monitoring folder from yamllint
2021-03-16 10:46:17 +01:00
Sébastien Han 88c0eb57cd ci: debug runners on failures
If one of the suite fails, it is sometimes handy to ssh into the
instance to precisely understand what's going on.
So by applying a debug label so as "debug-smoke-suite" you will be able
to ssh into the runner to debug. By default it looks
like the runner will be cancelled automatically after 6 hours as per the
official doc: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes

I've had a different experience, and somehow 45min seems to be the limit
but I might be wrong.

Once the label is applied, go into the check and the once you are
interested in and search the step "setup tmate session for debugging".
It should output lines with the connection details.

To get the list of all labels see: https://github.com/rook/rook/labels?q=debug-
Example run is available here: https://github.com/rook/rook/pull/7416/checks?check_run_id=2120103989

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-16 10:43:38 +01:00
Sébastien Han 31db03fece ceph: auto-gen crds
Finally! We can now stop editing manually our crds definition. Simply
run `make crds-gen`. These two files:

* `cluster/examples/kubernetes/ceph/crds.yaml`
* `cluster/charts/rook-ceph/templates/resources.yaml`

will be autogenerated for us.

We rely on the controller-gen tool, it reads our API definitions from
`pkg/apis/` and produces the CRD files accordingly.

It uses "markers" to add extra yaml fields to the CRD, for instance we
have a lot fields with:

```
nullable: true
x-kubernetes-preserve-unknown-fields: true
```

The corresponding API type markers are:

```
// +kubebuilder:pruning:PreserveUnknownFields
// +nullable
```

For more API convention see
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#optional-vs-required
and for the markers see: https://book.kubebuilder.io/reference/markers/crd-validation.html

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-16 09:16:24 +01:00
subhamkrai acfbc78392 ceph: ignore the monitoring folder from yamllint
this commit adds the monitoring folder to
yamllint ignore list.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-03-16 12:33:37 +05:30
Blaine Gardner 6324746c18 Merge pull request #7409 from BlaineEXE/fix-ci
ci: update minikube github action to fix apt-get
2021-03-15 10:39:26 -06:00