Commit Graph
6553 Commits
Author SHA1 Message Date
Sébastien Han 30dd2218d0 Merge pull request #7488 from leseb/bz-1941647-2
ceph: remove extra slash in curl
2021-03-26 16:22:37 +01:00
Sébastien Han d9646d09ce ceph: remove extra slash in curl
When no VAULT_BACKEND_PATH is specified we default to the API one which
is set to "secret/", we could use a different variable but we don't want
to break the library support. Bonus point this will also fix issue with
users passing a slash at the end of the path.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-26 15:41:13 +01:00
Sébastien Han 206ea50cc3 Merge pull request #7453 from cybozu-go/ceph-validate-all-owner-references
ceph: validate all owner references
2021-03-26 14:57:32 +01:00
Sébastien Han 41781839c3 Merge pull request #7480 from leseb/ci-object-user
ci: try to mitigate object user error
2021-03-26 14:48:00 +01:00
Sébastien Han ac322c0bc8 Merge pull request #7486 from subhamkrai/remove-leftover
ci: update make crds-gen to make crds
2021-03-26 11:31:29 +01:00
subhamkrai 3c591ff7a1 ci: update make crds-gen to make crds
this commit update make crds-gen to make crds

Signed-off-by: subhamkrai <srai@redhat.com>
2021-03-26 15:48:18 +05:30
Sébastien Han 370f93eb08 ci: try to mitigate object user error
Sometimes the ci fails to find the object store user, this could be
because the user is created before the object store. So first it fails
since there is no object store and stay in a retry back-off.
Then the object store is created and always need a bit of time, at the
same time the object-user is still waiting and the next retry is longer.
Creating the object store first and then the user hopefully will help
resolve that so we don't have to increase the retry for the object-user
presence.

The error:

```
2021-03-26T08:39:34.7283769Z 2021-03-26 08:39:34.727946 I | testutil: All 2 pod(s) with label rook_object_store=teststore are running
2021-03-26T08:39:34.7284744Z 2021-03-26 08:39:34.727972 I | testutil: Running kubectl [apply -f -]
2021-03-26T08:39:35.1110681Z service/rgw-external-teststore created
2021-03-26T08:39:35.1142392Z 2021-03-26 08:39:35.112479 I | integrationTest: Check that RGW pods are Running
2021-03-26T08:39:35.1181683Z 2021-03-26 08:39:35.117763 I | testutil: 2 of 1 pods with label app=rook-ceph-rgw were found
2021-03-26T08:39:35.1251276Z 2021-03-26 08:39:35.124933 I | testutil: 2 of 1 pods with label app=rook-ceph-rgw were found
2021-03-26T08:39:35.1348603Z 2021-03-26 08:39:35.133276 I | integrationTest: RGW pods are running
2021-03-26T08:39:35.1350090Z 2021-03-26 08:39:35.133290 I | integrationTest: Object store created successfully
2021-03-26T08:39:35.1351373Z 2021-03-26 08:39:35.133295 I | integrationTest: Waiting 5 seconds for the object user to be created
2021-03-26T08:39:40.1340659Z 2021-03-26 08:39:40.133401 I | integrationTest: Checking to see if the user secret has been created
2021-03-26T08:39:40.1342715Z 2021-03-26 08:39:40.133440 D | exec: Running command: kubectl get -n smoke-ns secrets -l rook_object_store=teststore -l user=rook-user
2021-03-26T08:39:40.2618726Z 2021-03-26 08:39:40.261412 I | clients: Unable to find user secret
2021-03-26T08:39:40.2619705Z 2021-03-26 08:39:40.261433 I | integrationTest: (0) secret check sleeping for 5 seconds ...
2021-03-26T08:39:45.2621870Z 2021-03-26 08:39:45.261641 D | exec: Running command: kubectl get -n smoke-ns secrets -l rook_object_store=teststore -l user=rook-user
2021-03-26T08:39:45.3863424Z 2021-03-26 08:39:45.386048 I | clients: Unable to find user secret
2021-03-26T08:39:45.3864586Z 2021-03-26 08:39:45.386075 I | integrationTest: (1) secret check sleeping for 5 seconds ...
2021-03-26T08:39:50.3869496Z 2021-03-26 08:39:50.386292 D | exec: Running command: kubectl get -n smoke-ns secrets -l rook_object_store=teststore -l user=rook-user
2021-03-26T08:39:50.4991166Z 2021-03-26 08:39:50.498862 I | clients: Unable to find user secret
2021-03-26T08:39:50.4991987Z 2021-03-26 08:39:50.498881 I | integrationTest: (2) secret check sleeping for 5 seconds ...
2021-03-26T08:39:55.4998176Z 2021-03-26 08:39:55.499038 D | exec: Running command: kubectl get -n smoke-ns secrets -l rook_object_store=teststore -l user=rook-user
2021-03-26T08:39:55.6075640Z 2021-03-26 08:39:55.607337 I | clients: Unable to find user secret
2021-03-26T08:39:55.6076472Z 2021-03-26 08:39:55.607355 I | integrationTest: (3) secret check sleeping for 5 seconds ...
2021-03-26T08:40:00.6080687Z 2021-03-26 08:40:00.607466 D | exec: Running command: kubectl get -n smoke-ns secrets -l rook_object_store=teststore -l user=rook-user
2021-03-26T08:40:00.8415649Z 2021-03-26 08:40:00.841309 I | clients: Unable to find user secret
2021-03-26T08:40:00.8417179Z 2021-03-26 08:40:00.841331 I | integrationTest: (4) secret check sleeping for 5 seconds ...
2021-03-26T08:40:05.8419407Z 2021-03-26 08:40:05.841385 D | exec: Running command: kubectl get -n smoke-ns secrets -l rook_object_store=teststore -l user=rook-user
2021-03-26T08:40:05.9732221Z 2021-03-26 08:40:05.972910 I | clients: Unable to find user secret
2021-03-26T08:40:05.9733777Z 2021-03-26 08:40:05.972932 I | integrationTest: (5) secret check sleeping for 5 seconds ...
2021-03-26T08:40:10.9734134Z 2021-03-26 08:40:10.973067 D | exec: Running command: kubectl get -n smoke-ns secrets -l rook_object_store=teststore -l user=rook-user
2021-03-26T08:40:11.1686581Z 2021-03-26 08:40:11.168373 I | clients: Unable to find user secret
2021-03-26T08:40:11.1687925Z     ceph_base_object_test.go:87:
2021-03-26T08:40:11.1688924Z         	Error Trace:	ceph_base_object_test.go:87
2021-03-26T08:40:11.1689961Z         	            				ceph_smoke_test.go:132
2021-03-26T08:40:11.1691113Z         	Error:      	Should be true
2021-03-26T08:40:11.1692167Z         	Test:       	TestCephSmokeSuite/TestObjectStorage_SmokeTest
2021-03-26T08:40:11.1693751Z 2021-03-26 08:40:11.168502 D | ceph-object-controller: getting s3 user "rook-user"
2021-03-26T08:40:11.1695580Z 2021-03-26 08:40:11.168514 D | exec: Running command: kubectl exec -i rook-ceph-tools-78cdfd976c-2nbp2 -n smoke-ns -- timeout 15 radosgw-admin user info --uid rook-user --rgw-realm= --rgw-zonegroup= --rgw-zone=
2021-03-26T08:40:11.6090406Z     ceph_base_object_test.go:89:
2021-03-26T08:40:11.6093015Z         	Error Trace:	ceph_base_object_test.go:89
2021-03-26T08:40:11.6093968Z         	            				ceph_smoke_test.go:132
2021-03-26T08:40:11.6095116Z         	Error:      	Received unexpected error:
2021-03-26T08:40:11.6095798Z         	            	failed to get user info: warn: s3 user not found
2021-03-26T08:40:11.6096724Z         	            	github.com/rook/rook/pkg/operator/ceph/object.GetUser
2021-03-26T08:40:11.6097795Z         	            		/home/runner/work/rook/rook/pkg/operator/ceph/object/user.go:98
2021-03-26T08:40:11.6098764Z         	            	github.com/rook/rook/tests/framework/clients.(*ObjectUserOperation).GetUser
2021-03-26T08:40:11.6099814Z         	            		/home/runner/work/rook/rook/tests/framework/clients/object_user.go:45
2021-03-26T08:40:11.6100792Z         	            	github.com/rook/rook/tests/integration.runObjectE2ETest
2021-03-26T08:40:11.6101858Z         	            		/home/runner/work/rook/rook/tests/integration/ceph_base_object_test.go:88
2021-03-26T08:40:11.6103298Z         	            	github.com/rook/rook/tests/integration.(*SmokeSuite).TestObjectStorage_SmokeTest
2021-03-26T08:40:11.6104371Z         	            		/home/runner/work/rook/rook/tests/integration/ceph_smoke_test.go:132
2021-03-26T08:40:11.6105104Z         	            	reflect.Value.call
2021-03-26T08:40:11.6105856Z         	            		/opt/hostedtoolcache/go/1.15.10/x64/src/reflect/value.go:476
2021-03-26T08:40:11.6106662Z         	            	reflect.Value.Call
2021-03-26T08:40:11.6107412Z         	            		/opt/hostedtoolcache/go/1.15.10/x64/src/reflect/value.go:337
2021-03-26T08:40:11.6108217Z         	            	github.com/stretchr/testify/suite.Run.func1
2021-03-26T08:40:11.6109104Z         	            		/home/runner/go/pkg/mod/github.com/stretchr/testify@v1.6.1/suite/suite.go:158
2021-03-26T08:40:11.6109844Z         	            	testing.tRunner
2021-03-26T08:40:11.6110578Z         	            		/opt/hostedtoolcache/go/1.15.10/x64/src/testing/testing.go:1123
2021-03-26T08:40:11.6111271Z         	            	runtime.goexit
2021-03-26T08:40:11.6112037Z         	            		/opt/hostedtoolcache/go/1.15.10/x64/src/runtime/asm_amd64.s:1374
2021-03-26T08:40:11.6112995Z         	Test:       	TestCephSmokeSuite/TestObjectStorage_SmokeTest
```

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-26 10:00:19 +01:00
Sébastien Han 9c00005140 Merge pull request #7478 from leseb/make-crds
ceph: simply "make crds"
2021-03-26 09:57:16 +01: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 e2b10248c0 Merge pull request #7474 from leseb/ipma-type
ceph: add static IPAM support for CNI
2021-03-26 08:57:01 +01:00
Satoru Takeuchi 9eb3160d8b ceph: validate all owner references
Remaining work of #7259

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2021-03-26 06:43:54 +00:00
Blaine Gardner 7b1dd7ed40 Merge pull request #7473 from leseb/external-secret-type
ceph: set secret type on external cluster script
2021-03-25 11:36:43 -06:00
Sébastien Han 23343927ca ceph: fix external bash script env var
s/CSI_RBD_NODE_SECRET_SECRET/CSI_RBD_NODE_SECRET

No need for the double SECRET

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-25 18:13:28 +01:00
Sébastien Han bce1474f06 ceph: add static IPAM support for CNI
We now support reading Network Attachment Definitions with a "static"
IPAM.
Also added more unit tests.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-25 17:59:34 +01:00
Sébastien Han e30cca076d Merge pull request #7467 from leseb/ci-add-user-group
ci: fix disk issue with crashing osd
2021-03-25 11:09:39 +01:00
Sébastien Han be576e9f51 Merge pull request #7441 from MaXinjian/RGW_POOL_PREFIX
docs: add a warning before running create-external-cluster-resources.sh
2021-03-25 10:56:11 +01:00
Sébastien Han 03613feeb2 ceph: set secret type on external cluster script
The secret type was missing earlier and must be set
to "kubernetes.io/rook" so that the operator does not complain.

Closes: https://github.com/rook/rook/issues/5732
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-25 10:30:42 +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 b59870a827 ci: timeout all commands in toolbox
Let's default to 15s, just like the CLI default timeout.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-25 09:52:39 +01:00
Ma Xinjian 46b8ded3a1 docs: add a warning before running create-external-cluster-resources.sh
If we don't export RGW_POOL_PREFIX firstly, RGW_POOL_PREFIX will be set to
default value, which is "default". Add a warning in document to give user
instructions.

Signed-off-by: Ma Xinjian <maxj.fnst@cn.fujitsu.com>
2021-03-25 09:59:35 +08:00
Sébastien Han a196e8c0a1 ci: skip any cleanup if a test fails
If a CI test fails we don't want to cleanup anything and leave the
cluster in the state it is. This will help debugging the CI.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-24 19:03:09 +01:00
Sébastien Han 37d5c106ad ceph: fix init container "expand-encrypted-bluefs" multipath
When running encrypted OSDs on multipath the expand container was
failing to find the underlying device of the encrypted block. This was
because the underlying block was located in /dev/mapper and this path
wasn't mounted in the init container "expand-encrypted-bluefs".

This will manifest like so:

```
Underlying device for crypt device ocs-deviceset-block-dev-from-san-1-data-0-5qkmm-block-dmcrypt disappeared.
```

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-24 18:48:31 +01:00
Sébastien Han 4ef2162d17 Merge pull request #7459 from leseb/rm-used
ceph: remove unsed type field
2021-03-24 17:18:46 +01:00
Blaine Gardner 3096a7e7f0 Merge pull request #7469 from cloudical-io/docs_fixes
docs: remove left overs in /dev/mapper/ceph--*
2021-03-24 09:49:02 -06:00
Sébastien Han 52c56cfde4 Merge pull request #7466 from leseb/multipath-encryption
ceph: fix init container "expand-encrypted-bluefs" multipath
2021-03-24 15:25:50 +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
Alexander Trost ce5c6f5927 docs: fix disaster recovery mon patch command
This removes the curly brackets from the json patch used to remove the
livenessProbe of the mon pod. At least in 1.18+ otherwise the patch
fails with a "cryptic" error.

Resolves #7460

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2021-03-24 14:34:59 +01:00
Alexander Trost 055dcb1863 docs: remove left overs in /dev/mapper/ceph--*
During Ceph teradown these files also need to be removed as well.

This is a continuation of the closed PR #7395.

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2021-03-24 14:34:47 +01:00
Sébastien Han 5762ca43b2 ceph: fix init container "expand-encrypted-bluefs" multipath
When running encrypted OSDs on multipath the expand container was
failing to find the underlying device of the encrypted block. This was
because the underlying block was located in /dev/mapper and this path
wasn't mounted in the init container "expand-encrypted-bluefs".

This will manifest like so:

```
Underlying device for crypt device ocs-deviceset-block-dev-from-san-1-data-0-5qkmm-block-dmcrypt disappeared.
```

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-24 10:35:12 +01:00
Sébastien Han 09cb5d6b4a ceph: remove unsed type field
isExternal was not used anymore so let's remove it.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-23 10:31:37 +01:00
Sébastien Han 9cf788091a Merge pull request #7454 from leseb/vault-default-path
ceph: set default backend for vault and remove temp key
2021-03-22 18:25:03 +01:00
Sébastien Han a394640286 ceph: remove temp encryption key
Once we are done opening the block device, we should remove the key even
though it is mounted on a tmpfs.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-22 17:00:12 +01:00
Sébastien Han dd275a2906 ceph: set default vault backend path when not specified
If the path was not specified, the OSD init container would crash loop,
failing to reach the vault path.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-22 16:56:41 +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
Travis Nielsen 3bbc358d32 Merge pull request #7440 from travisn/mgr-labels
ceph: Set active mgr label on mgr services
2021-03-19 11:16:33 -06:00
Travis Nielsen c78e6a9e20 ceph: set active mgr label on mgr services
Other resources such as the service monitor need to match
the labels on the services to the active mgr, thus the active
mgr name is now set on the labels for the metrics service
and dashboard service.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-03-18 16:37:01 -06:00
Travis Nielsen 4d06ad1155 Merge pull request #7415 from subhamkrai/placement
ceph: placement in case of both PVC and non-PVC's
2021-03-18 12:33:02 -06:00
Sébastien Han e7c3e2c064 Merge pull request #7435 from aruniiird/fix-create-external-script-random-failure
ceph: fix for the random script failures because of open file issue
2021-03-18 16:57:35 +01:00
Arun Kumar Mohan 822a5194da ceph: fix for the random script failures because of open file issue
Script's tests were failing randomly because of an unclosed file
exceptions.

Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
2021-03-18 20:59:24 +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
Sébastien Han f13563d674 Merge pull request #7432 from leseb/csi-block-owner
ceph: fix csi blocker owner deletion
2021-03-18 10:38:09 +01:00
Sébastien Han 461dcd7457 ceph: fix csi blocker owner deletion
Small regression introduced in https://github.com/rook/rook/commit/26c8fd9bd14178d74dcc28f009e5c2f658224436
which was overriding the BlockOwnerDeletion from the ownerref.
Now, if set we don't modify it.
This fixes deployments on OCP.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-18 09:50:52 +01:00
Sébastien Han 67c669f183 Merge pull request #7425 from subhamkrai/gh-multi-k8s
ci: run gh action on multiple k8s version
2021-03-18 09:20:42 +01:00
subhamkraiandTravis Nielsen 319e4a41a4 ceph: placement in case of both PVC and non-PVC's
In the case of PVC,
We are giving lower priority to all placement.
We want deviceSet placement to applied and
override in case of overlapping settings and
we are merging nodeAffinity if applied in both
all placement and deviceSet.

In case of non-PVC,
we apply spec.placement

Signed-off-by: subhamkrai <srai@redhat.com>
Co-authored-by: Travis Nielsen <tnielsen@redhat.com>
2021-03-18 10:32:57 +05:30
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 7b3244a324 Merge pull request #7390 from travisn/refactor-tests
ceph: Refactor integration tests for simplification
2021-03-17 13:51:37 -06:00
Travis Nielsen 65fb9e0d92 Merge pull request #7419 from fritchie/maxsize-optional
ceph: mark maxSize as optional
2021-03-17 13:45:53 -06:00