Commit Graph
695 Commits
Author SHA1 Message Date
subhamkrai 0fddfcf307 ceph: handle golangci-lint linter errcheck error
this commit handle golangci-lint linter errcheck.

`errcheck` - Errcheck is a program for checking for
unchecked errors in go programs. These unchecked errors
can be critical bugs in some cases

To see only staticcheck linter output
`golangci-lint run --disable-all -E errcheck`

Signed-off-by: subhamkrai <srai@redhat.com>
2020-09-30 22:24:34 +05:30
Mudit Agarwal c547b36aa0 ceph: update csi sidecar images
This PR makes the changes in csi templates and
upgrade documentation required for updating
csi sidecar images.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2020-09-28 18:58:52 +05:30
subhamkrai de8dbbcdcc ceph: handle golangci-lint linter staticcheck error
this commit handle golangci-lint linter staticcheck error.

`staticcheck` - Staticcheck is a go vet on steroids,
applying a ton of static analysis checks.

To see only `staticcheck` linter output

`golangci-lint run --disable-all -E staticcheck`

Signed-off-by: subhamkrai <srai@redhat.com>
2020-09-24 15:04:55 +05:30
subhamkrai 829778f251 ceph: handle golangci-lint linter ineffassign
this commit will enable one more linter ineffassign
in golangci-lint.

This linter throws an error when variable is assigned and never used.

`golangci-lint run --disable-all -E ineffassign` is used detects ineffassign
errors only.

Signed-off-by: subhamkrai <subhamkumarrai03@gmail.com>
2020-09-21 14:31:18 +05:30
Travis Nielsen 02fa0eb921 Merge pull request #6228 from Madhu-1/fix-ownerref
ceph: remove owner reference set by rook on csidriver
2020-09-18 10:09:36 -06:00
subhamkrai 1e9bb8e6e2 ceph: handle golangci-lint linter deadcode
this commit will enable one more linter `deadcode`
in golangci-lint .

Signed-off-by: subhamkrai <subhamkumarrai03@gmail.com>
2020-09-18 16:53:49 +05:30
Sébastien Han d118bd38a6 Merge pull request #6278 from subhamkrai/golanci-lint-unused
ceph: handle golangci-lint linter unused
2020-09-18 12:44:37 +02:00
subhamkrai 4c11e45155 ceph: integration test on OpenShift
this commit enables the rook integration
testing capability on openshift. currently
this commit enable CephSmokeSuite testing
only.

Signed-off-by: subhamkrai <subhamkumarrai03@gmail.com>
2020-09-18 14:30:57 +05:30
Sébastien Han 204ffd4065 Merge pull request #6250 from leseb/mirroring-config
ceph: add rbd-mirror configuration
2020-09-18 09:16:08 +02:00
subhamkrai f9fafe62d4 ceph: handle golangci-lint linter unused
this commit will enable one more linter
in golangci-lint.

Signed-off-by: subhamkrai <subhamkumarrai03@gmail.com>
2020-09-17 22:53:24 +05:30
Sébastien Han 451622a955 ceph: add rbd-mirror configuration
Rook is now capable of configuring mirroring between sites. The
implementation works at different levels:

* CephBlockPool: which introduces a new `mirroring` configuration as well
as `statusCheck`. When turned on, Rook will enable mirroring on the
pool. It will also create a bootstrap peer token and store it in a
Kubernetes Secret. The name of that Secret can be found in the Status
field of the CephBlockPool CRD. This token can be fetched and used by
other clusters to configure the site as a peer. Mirroring can be
configured either at the pool or the image level.

* CephRBDMirror: which introduces a new `peers` configuration allowing
Rook to connect to peers by passing a Secret name. The administrator will
create a Kubernetes Secret with 2 keys: 'token' for the bootstrap peer
token and 'pool' for the name of pool. Once detected the rbd-mirror
controller will go ahead and import the peer configuration.

Pool mirroring status example:

```
status:
  info:
    rbdMirrorBootstrapPeerSecretName: pool-peer-token-test
  mirroringInfo:
    lastChanged: "2020-09-17T14:47:27Z"
    lastChecked: "2020-09-17T14:48:27Z"
    summary:
      summary:
        mode: image
        peers:
        - client_name: client.rbd-mirror-peer
          direction: rx-tx
          mirror_uuid: ""
          site_name: rhcs
          uuid: c50522a4-28a4-4bd3-ba68-e11780308882
        site_name: 91eae0dd-06b1-4d2c-91f3-1311c9df382b-rook-ceph
  mirroringStatus:
    lastChecked: "2020-09-17T14:48:27Z"
    summary:
      summary:
        daemon_health: OK
        health: OK
        image_health: OK
        states:
          replaying: 1
```

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-09-17 19:05:04 +02:00
subhamkrai 25c116a4bd ceph: handle golangci-lint linter gosimple
this commit handles all the errors  check for
golangci-lint linter gosimple.

Signed-off-by: subhamkrai <subhamkumarrai03@gmail.com>
2020-09-17 15:10:27 +05:30
Madhu Rajanna a1024ebc75 ceph: remove owner reference set by rook on csidriver
currently, we are setting the rook operator as owner
on the csidriver objects,  as csidriver is cluster
scoped object we should not set namespaced object as
owner on cluster scoped object

fixes #6162

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-09-15 11:39:27 +05:30
Travis Nielsen d55815d698 Merge pull request #6066 from Madhu-1/rbd-snap-clone-test
ceph: Add E2E testing for csi snapshot and clone
2020-09-14 11:24:58 -06:00
Travis Nielsen df47f58c05 ceph: run integration tests on k8s 1.19 for PRs
In K8s 1.19 the integration tests are not running in PRs since no test suites
were assigned to 1.19. Similarly, the flex suite was not being run since 1.14
was removed from the test matrix in master.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-09-10 11:04:40 -06:00
Madhu Rajanna e864b8d42d ceph: add E2E testing for snapshot and clone
Added E2E testing to create,delete and restore
a snapshot, create a pvc-pvc clone, install
and uninstall snapshot controller and snapshot
CRD.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-09-10 22:05:15 +05:30
Satoru Takeuchi 15a159b1ff ci: fix how to run the integration test
If we try to run the integration test with `go test`, it fails as follows.

```
$ go test -v -timeout 1800s -run CephMultiClusterDeploySuite github.com/rook/rook/tests/integration
=== RUN   TestCephMultiClusterDeploySuite
2020-09-02 00:00:31.874738 I | installer: test environment variable (default) "STORAGE_PROVIDER_TESTS"=""
2020-09-02 00:00:31.950226 I | testutil: Loaded kubectl context kubernetes at https://192.168.123.2:6443. secure=false
2020-09-02 00:00:31.951121 I | integrationTest: running all tests
2020-09-02 00:00:32.027964 I | testutil: Loaded kubectl context kubernetes at https://192.168.123.2:6443. secure=false
2020-09-02 00:00:32.028640 I | installer: Rook Version: master
2020-09-02 00:00:32.028667 I | installer: Ceph Version: ceph/ceph:v14
2020-09-02 00:00:32.028686 I | installer: test environment variable "TEST_HELM_PATH"="/tmp/rook-tests-scripts-helm/linux-amd64/helm"
2020-09-02 00:00:32.031927 I | installer: test environment variable "TEST_SCRATCH_DEVICE"="/dev/sdb"
2020-09-02 00:00:32.031982 I | testutil: Running tests/scripts/localPathPV.sh [/dev/sdb]
    ceph_multi_cluster_test.go:161:
                Error Trace:    ceph_multi_cluster_test.go:161
                                                        ceph_multi_cluster_test.go:151
                                                        ceph_multi_cluster_test.go:81
                                                        suite.go:102
                                                        ceph_multi_cluster_test.go:62
                Error:          Received unexpected error:
                                fork/exec tests/scripts/localPathPV.sh: no such file or directory
                Test:           TestCephMultiClusterDeploySuite
--- FAIL: TestCephMultiClusterDeploySuite (0.16s)
FAIL
FAIL    github.com/rook/rook/tests/integration  0.211s
FAIL
$

```

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-09-08 15:03:05 +09:00
Satoru Takeuchi 8242011307 ci: add the descriptions of important environment variables
Some environment variables are mandatory to run the integration test.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-09-08 15:03:05 +09:00
Satoru Takeuchi 1b2ccf2b6c ci: remove unnecessary argument of kubeadm-install
The second argument of kubeadm-install.sh is not used.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-09-08 15:03:05 +09:00
Satoru Takeuchi a824c253ef ci: update the default Kubernetes version
Update the default Kubernetes version to v1.15.12 that is tested in CI.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-09-08 15:03:05 +09:00
Sébastien Han 7dea2b10ff ceph: disable ceph mgr test temporarily
The CI keeps failing intermittently due to
https://github.com/rook/rook/issues/5877 and the fix has not merged yet
so disabling until fixed.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-09-01 11:24:09 +02:00
Sébastien Han 96b4a56a57 ceph: silence aws s3 sdk logs on healthcheck
We don't need to activate the debug logs on the objectstore
healthchecks.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-09-01 09:32:15 +02:00
Sébastien Han 6b11a86bf0 Merge pull request #6193 from satoru-takeuchi/ci-force-reset-test-cluster
ci: reset test cluster without prompting
2020-09-01 09:12:05 +02:00
Satoru Takeuchi 4b764c20b1 ci: reset test cluster without prompting
It's messy to answer `y` everytime in `tests/script/kubeadm.sh clean.`
Since the cluster only exists for testing, it's safe to reset without prompting.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-09-01 14:02:28 +09:00
Sébastien Han 9a06d059f0 ci: change local disk path
With the recent aws instance type the disk naming changed too, so
replace xvdc with nvme0n1.

Closes: https://github.com/rook/rook/issues/6189
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-31 22:04:46 +02:00
Sébastien Han 04467dd915 ci: print dev info
Try to understand the issue:

invalid scratch device name: /dev/xvdc

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-31 22:04:33 +02:00
Travis Nielsen 34d40fee6e ceph: upgrade test uses rbac v1 instead of v1beta1
The upgrade tests can safely use the rbac.authorization.k8s.io/v1 instead of
rbac.authorization.k8s.io/v1beta1. In K8s 1.19, the upgrade test was failing
because v1beta1 has been deprecated.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-08-28 10:26:36 -06:00
Jared Watts 06ab07be8b Merge pull request #5863 from prksu/nfs-provisioner
nfs: nfs provisioner controlled by operator
2020-08-24 16:26:23 -07:00
Madhu Rajanna 0aa0957bf1 ceph: remove preStop from daemonset template
The lifecycle preStop hook fails on container stop / exit
because /bin/sh is not present in the driver registrar container
image.

the driver-registrar will remove the socket file
before stopping. we dont need to have any preStop hook
to remove the socket as it was not working as expected

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-24 19:25:44 +05:30
Ahmad Nurus S 5cc2ceda2d nfs: make provisioner as sidecar of nfs server
Signed-off-by: Ahmad Nurus S <prksu.sh@gmail.com>
2020-08-21 16:40:33 +07:00
Alexander Trost ed3c0eeff2 test: operator use rbac.authorization.k8s.io/v1 consistently
This replaces any K8S clientset usages of the
`rbac.authorization.k8s.io/v1beta1` APIs with
`rbac.authorization.k8s.io/v1` client.
This is done as some RBAC objects used the `v1beta1` and others already
using `v1`, for consistency.

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2020-08-20 12:08:32 +02:00
Alexander Trost be16bc455f docs: operator use rbac.authorization.k8s.io/v1
This replaces any uses of `rbac.authorization.k8s.io/v1beta1` with
`rbac.authorization.k8s.io/v1` affecting RBAC objects like ClusterRole
and ClusterRoleBindings, etc. to make it consistent.
This is done as some RBAC objects used the `v1beta1` and others already
using `v1`.

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2020-08-20 12:08:32 +02:00
binoue aa2af5a24b ci: clean up after SmokeTest
Currently, SmokeTest is not cleaned up after the test.
As this can affect other following tests, set rookCephCleanup as true.

Signed-off-by: binoue <banji-inoue@cybozu.co.jp>
Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-08-20 03:53:03 +00:00
binoue 5c897e4a21 ceph: fix error log
"Giving up waiting for Rook Toolbox to be ready" error always
logged even if Rook Toolbox is ready.
This commit fix the problem.

Signed-off-by: binoue <banji-inoue@cybozu.co.jp>
2020-08-18 08:04:17 +09:00
Sébastien Han 45b8a0c88c Merge pull request #6035 from guni1192/ci-fix-remove-cluster-role-bindings
ci: skip the creation of already existing clusterrolebinding
2020-08-17 17:52:38 +02:00
Sébastien Han a5982b749f ceph: fix object store yaml example
The healthcheck for the bucket is called `bucket`.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-17 17:24:26 +02:00
Travis Nielsen 7481993959 Merge pull request #6017 from humblec/ceph-csi-snapshotter
Add/update ceph csi snapshotter rbac and sidecar deployments
2020-08-13 12:32:35 -06:00
Humble Chirammal 97a3283099 ceph: add snapshot create/delete and restore doc for cephfs
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2020-08-13 22:17:01 +05:30
Takashi IIGUNI 39fae17fb1 ci: cleanup clusterrolebindings
`anon-user-access` clusterrolebinding is created when installing rook operator.
However each test suite does not delete the clusterrolebinding,
and cause errors.
This PR skip creating the clusterrolebinding in each suite if it already exists.

Signed-off-by: Takashi IIGUNI <iiguni.tks@gmail.com>
2020-08-13 03:02:14 +00:00
subhamkrai e21854145a ceph: disable object store port when secureport specified
currently, the object store schema requires the
port to be non-zero. This does not allow http
access to the object store to be disabled.
so setting the port minimum to 0 to from 1 in the cr.

Signed-off-by: subhamkrai <subhamkumarrai03@gmail.com>
2020-08-12 21:57:01 +05:30
Sébastien Han ec0a0af76f Merge pull request #5975 from tenzen-y/remove-unnecessary-rm-command
ci: remove unnecessary "rm" command
2020-08-12 11:32:29 +02:00
Travis Nielsen 9168c22183 ceph: improve stability of object bucket tests
The object bucket tests will now always check if the conditions being waited
upon for creating users and buckets were completed, instead of allowing
the test to continue even when they didn't succeed.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-08-10 14:46:36 -06:00
Humble Chirammal 6613b3a9e9 ceph: update e2e manifest for cephfs snapshotter sidecar
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2020-08-10 11:31:30 +05:30
mridulv 30cd786303 ceph: adding ability to specify crushroot in the CRD
Previously we did not supported defining crushRoot in some of the CRDs. With this fix, we plan to fix this behaviour.

Signed-off-by: mridulv <mridulv09@gmail.com>
2020-08-08 16:24:15 +05:30
Travis Nielsen 89284d9155 ceph: improve object bucket test stability
The object bucket check is sometimes not completed yet
that causes the integration test to fail intermittently.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-08-06 09:25:35 -06:00
Umanga Chapagain da1910840a ceph: add CRD changes and documentation
adds `enableRBDStats` to CRD manifets and updates documentation
on its usage.

Signed-off-by: Umanga Chapagain <chapagainumanga@gmail.com>
2020-08-06 12:11:55 +05:30
tenzen-y 1d7d715482 ci: remove unnecessary "rm" command
This commit will remove "sudo rm /usr/local/bin/kube*" and "sudo rm kubectl" in "tests/scripts/kubeadm.sh".
I think that CI-test doesn't make those files.

Signed-off-by: tenzen-y <toyonomajyutushi@yahoo.co.jp>
2020-08-06 05:34:01 +00:00
Travis Nielsen e45fbf9205 Merge pull request #5974 from guni1192/ceph-use-fixed-mon-directory-in-ci
ceph: use fixed mon directory in ci
2020-08-05 14:53:35 -06:00
Sébastien Han dfc701805a Merge pull request #5873 from leseb/encryption-raw-mode
ceph: add encryption support for osd pvc
2020-08-05 13:34:59 +02:00
Takashi IIGUNI 18a28f7dee ceph: use fixed mon directory in ci
It's not necessary to use random string for mon directory.
In addition, current implementation leaves garbage under /var/lib/rook.

Signed-off-by: Takashi IIGUNI <iiguni.tks@gmail.com>
2020-08-05 09:04:34 +00:00