Commit Graph
3698 Commits
Author SHA1 Message Date
Sébastien Han ae56d8d2ff Merge pull request #4110 from leseb/mrg-annotations
ceph: mgr do not override annotation
2019-10-16 18:26:44 +02:00
Sébastien Han a6b94665ff Merge pull request #4098 from travisn/delete-file-test-pod
Multiple integration test fixes to improve CI stability
2019-10-16 17:56:24 +02:00
Sébastien Han 9a84dc5f69 Merge pull request #4094 from leseb/clusterdisruption-cluster-state
ceph: hide wrong error for clusterdisruption controller
2019-10-16 16:47:59 +02:00
Sébastien Han f6a5caa164 ceph: mgr do not override annotation
The current implementation was overriding any previous annotations set on
the object meta.
Moving the logic to its own method as well as adding unit tests.

Closes: https://github.com/rook/rook/issues/4106
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-10-16 11:28:11 +02:00
Sébastien Han b5d0a0da44 Merge pull request #4102 from awalker125/#bug3885
ceph: change imagepullpolicy for csi-snapshot image
2019-10-16 11:11:35 +02:00
Sébastien Han 05140d7a9e ceph: hide wrong error for clusterdisruption controller
The clusterdisruption starts up before the Ceph cluster is created and
during the initilization, it'll display invalid error messages such as:

2019-10-14T04:22:21.243679454Z 2019-10-14 04:22:21.243668 E | clusterdisruption-controller: could not check cluster health: failed to get status: exit status 1
2019-10-14T04:22:22.524222494Z 2019-10-14 04:22:22.524179 I | exec: Running command: ceph status --connect-timeout=15 --cluster=openshift-storage --conf=/var/lib/rook/openshift-storage/openshift-storage.config --keyring=/var/lib/rook/openshift-storage/client.admin.keyring --format json --out-file /tmp/605071670
2019-10-14T04:22:22.617370007Z 2019-10-14 04:22:22.617321 I | exec: Error initializing cluster client: ObjectNotFound('error calling conf_read_file',)

That error message is invalid since the cluster is not up and running
YET.
So let's simply log a message.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-10-16 11:00:14 +02:00
Travis Nielsen f52abf4ed6 Merge pull request #4058 from jmolmo/edgefs_selfgenerated_code
EdgeFS: Auto generated code missed
2019-10-15 23:55:04 -06:00
Travis Nielsen 62c15d547e Merge pull request #4099 from mateuszlos/ceph_fix_topologyaware
ceph: fix topologyAware support
2019-10-15 18:40:27 -06:00
Mateusz Los cb52aea9a3 ceph: add OSDs to proper buckets in crush hierarchy while deployment
add missing topologyAware and location env variables to OSD pods

Signed-off-by: Mateusz Los <los.mateusz@gmail.com>
2019-10-15 17:15:01 -06:00
travisn 0cca2cdef4 tests: increase wait timeout for mon failover tests
The timeout of 80 seconds wasn't always sufficient for mon failover.
The timeout is now increased to 150 seconds.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-15 17:13:26 -06:00
travisn 378f209d63 tests: ceph multicluster tests to wait for one cluster at a time
The two clusters were being created in parallel by the tests
and sometimes causing the test to timeout. The operator handles
the cluster serially so we don't gain anything by starting
them asynchronously. With this change the tests will be started
serially to match the behavior of the operator and avoid
the issues with test timeouts.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-15 17:13:26 -06:00
travisn 98c21950aa tests: mark failed test for log collection
The logs are only collected by default if a test failed.
Ensure that we collect the logs if the test setup step
failed.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-15 17:13:25 -06:00
travisn a178cccd77 tests: consolidate block integration tests
The BlockCreateSuite and BlockMountUnmountSuite suites are almost identical
for running block tests with different types of mounts. We can
consolidate these into a single test suite and eliminate a couple of
the tests that are already covered by other tests.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-15 17:13:25 -06:00
travisn 979b6fd2cb tests: use kubectl create instead of apply
Testing if the create does any better in the tests than apply.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-15 17:13:25 -06:00
travisn f5eb11d863 tests: add logging to track down file test cleanup issue
Adding more logging until we can track down the file-test pod
cleanup issue

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-15 17:13:25 -06:00
Blaine Gardner 7d77b08af1 Merge pull request #3554 from SUSE/osd-config-refactor
Ceph directory-based OSDs: config refactoring
2019-10-15 13:54:34 -06:00
Blaine Gardner db7a6da09e ceph: do ceph:ceph chown in init containers
Following the Ceph OSD rework, my test environment regularly failed to
start OSDs, as they would start before the postStart lifecyle hook which
was chown'ing the log and data directories could finish. Pods failed to
start for an arbitrarily long time before starting successfully. This
was a manifestation of a race condition identified in Ceph monitors in
https://github.com/rook/rook/pull/3594#discussion_r312279176

Create a Ceph operator-level method to create an init container that
will chown the necessary directories for all Ceph daemons (any daemon
which runs as the ceph:ceph user-and-group). Also add this container to
expectations for Ceph pod templates in unit tests.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-10-15 12:12:46 -06:00
Blaine Gardner 70810dd55a ceph: osd: do not init ceph.conf for dir OSDs
Just as with the mon, mgr, mds, rgw, and rbd-mirror daemons, do not
generate a ceph.conf in an init container for directory-based OSDs.
Instead use the mon config database and the commandline to supply all
the needed arguments for running these OSDs.

Also generate a keyring secret to mount to OSD pods. Use this
secret for directory-based OSDs for now with the intention to
use this for other OSDs in the future.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-10-15 12:12:46 -06:00
Blaine Gardner e2155afa0f ceph: osd: use mon DB config for dir-based OSDs
As with the rest of the Ceph daemons, use the new config patters for
dir-based OSDs. Do not generate a config to use in an init container;
instead use CLI flags and the mon config database.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-10-15 10:10:08 -06:00
Blaine Gardner 9ab2b885d4 ceph: osd: use DataPathMap for dir-based OSDs
This is just one small unit of work that still results in usable
dir-based OSDs. The goal is to build on this to run dir-based OSDs using
the new config patterns used by the other Ceph daemons. This also
removes an unnecessary mount of the dataDirHostPath in directory-based
OSD containers.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-10-15 10:10:07 -06:00
Blaine Gardner 3584e8ccce ceph: osd: fix wrong log file path on host
Log file path on host for OSDs was dataDirHostPath/log/<namespace>
instead of dataDirHostPath/<namespace>/log as with other daemons.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-10-15 10:10:06 -06:00
Travis Nielsen fdd92ec883 Merge pull request #4100 from morimoto-cybozu/clarify-errors-in-clusterd
Return explicit errors
2019-10-15 08:57:06 -06:00
awalker60 0345468b6b ceph: fix for csi-snapshotter always pulling
This switches csi-snapshotter to IfNotPresent which works better in production and offline environments.

Signed-off-by: awalker60 <awalker125@users.noreply.github.com>
2019-10-15 10:41:03 +01:00
Sébastien Han ff4b31ff0a Merge pull request #4038 from travisn/sanitize-master-tag
Sanitize the master tag
2019-10-15 11:38:22 +02:00
Sébastien Han 12d69e6d0c Merge pull request #4096 from travisn/run-min-test-matrix
Run the distributed test matrix in PRs
2019-10-15 10:34:23 +02:00
morimoto-cybozu 815927d943 clusterd: return explicit errors
PopulateDeviceInfo() in pkg/clusterd/disk.go returns nil as *sys.LocalDisk
if an error has occurred.  This causes a nil pointer exception at
getAvailableDevices() in pkg/daemon/ceph/osd/daemon.go.  At least the returned
value should be checked at the caller.
I added an explicit error to the return value of PopulateDeviceInfo().  This
naturally revokes an error check at the caller.
I modified PopulateDeviceUdevInfo() in the same file too.

Signed-off-by: morimoto-cybozu <kenji_morimoto@cybozu.co.jp>
2019-10-15 08:30:45 +00:00
Travis Nielsen 8c6c211ab0 Merge pull request #4090 from travisn/owner-ref-cleanup
OwnerReference and test pod cleanup
2019-10-14 13:47:53 -06:00
travisn 1d97a6089d build: sanitize the master tag
The master branch uses the first tag from the last release
to create the version tag. Since the 1.1 release this tag
can include the alpha, beta, or rc tags, which only make
sense for the release tags, but not the master tag. This
change removes the suffix from the master tag.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-14 10:58:51 -06:00
travisn ac8f0dff09 tests: by default run the minimum test matrix in PRs
The CI runs the integration tests on several versions of K8s. By default
the integration tests have all been running on all versions of K8s. With the
recent option to run a minimum matrix for ceph tests it has shown to be reliable
for PRs and is much faster to have the test distribution.

Master and release builds will still run the full set of test suites on all
versions of K8s.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-14 10:23:04 -06:00
travisn bc68440006 ceph: more robust removal of cluster finalizer
The cluster finalizer in some scenarios was not being removed
during cluster removal. Specifically, if the cluster CR had been
modified, the operator would always fail to remove the finalizer.
This could occur when the CR status is updated around the same time
that the cluster is deleted. Therefore, we need to remove the finalizer
from a freshly retrieved instance of the cluster.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-14 09:29:46 -06:00
travisn d1680b2cca tests: ensure cluster finalizer removed during cleanup
The tests must ensure that the cluster is cleaned up so that
other test suites will not be affected by cleanup of a previous
test suite. Removing the cluster finalizer is critical to this
cleanup.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-14 09:29:46 -06:00
travisn 2b3d1f45ef tests: consolidate the filesystem tests
There are two separate integration tests for file. To simplify
and streamline and potentially eliminate some random failures,
these tests now consume the same file system instead of creating
a separate file system.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-14 09:29:45 -06:00
travisn a92850b307 tests: simplify filesystem tests and client pod deletion
The filesystem test deletes the client test pod by deleting the entire yaml
and sometimes hangs the integration tests. This is the most common intermittent
error in the CI. Now the deletion will happen more directly with a pod delete
command. If it does still fail deletion at least the deletion should timeout
sooner.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-14 09:29:45 -06:00
travisn b0a3bea421 ownerrefs: set owners based on name instead of namespace
The owner references should be set based on the name, otherwise the
garbage collector will delete the resources at some point.
These references to yugabyte, minio, and cockroach were
missed in the original fix for these references.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-14 09:29:45 -06:00
travisn 5db209fc5b ceph: allow resources to be deleted via owner references
The resources for rgw, mds, and nfs were being cleaned up explicitly when
the CR was deleted. This is legacy from before the owner references were
set on the CRs. Now the owner references are set to the appropriate CRs so
the resources will be cleaned up upon deletion of the specific CR
rather than the cluster CR.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-14 09:29:45 -06:00
travisn 22391377a8 ceph: remove full path from vgchange call
The full path to vgchange should not be necessary. For some
downstream releases the path may even be in a different path.
Therefore we require that vgchange be in the path.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-14 09:29:45 -06:00
travisn f4d8ad74af version: print the golang version with the rook version
The version of golang used to build rook is helpful
troubleshooting information. The rook version command will
now print the version of golang.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-10-14 09:29:44 -06:00
Sébastien Han 43b5a9692e Merge pull request #4070 from Madhu-1/fix-cephfs-reg
csi: update cephfs registration directory name
2019-10-11 12:14:15 +02:00
Sébastien Han ee5c02c7c3 Merge pull request #4081 from binoue/fix-links
doc: update outdated links
2019-10-11 11:20:07 +02:00
binoue 170f45cd42 doc: update wrong/outdated links
this fix not working links

Signed-off-by: binoue <banji-inoue@cybozu.co.jp>
2019-10-11 18:11:49 +09:00
Sébastien Han d7956facdb Merge pull request #4075 from rohantmp/mdsFix
[Ceph] Fix: PDB for MDS not created when activeStandby:true and activeCount: 1
2019-10-11 11:02:12 +02:00
Travis Nielsen ec75db503f Merge pull request #4024 from thotz/brownfield
Fixing issues for object bucket claims for brownfield cases (delete policy)
2019-10-10 15:48:35 -06:00
Rohan CJ 0d9442982b ceph: Fix PDB for MDS is not created if minAvailable <= 1.
It should be minAvailable < 1.

Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2019-10-10 21:34:20 +05:30
Rohan CJ 3c5856fc2a Ceph: Take activeStandby into account for CephFileSystem disruption budget.
When activeStandby is set on the CephFilesystem, the effective
activeCount will be incremented.

Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2019-10-10 21:31:58 +05:30
Sébastien Han 776f3951dc Merge pull request #4072 from leseb/mergify-rebase
mergify: change config to allow auto-merging
2019-10-10 17:36:19 +02:00
Sébastien Han e17d22a363 mergify: change config to allow auto-merging
Let's not do a rebase, but only merge. Rook is configured to refuse the
rebase and mergify fails with the following Github error:

GitHub error message: Rebase merges are not allowed on this repository.

This commit fixes the error.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-10-10 17:29:43 +02:00
Jiffin Tony Thottan 3f3af19a13 objectstore: remove user unlink in Revoke()
The access of user will be revoked by Droppolicy(). And user unlink
need to perform only if it is the owner. For Delete() it makes sense
to call user unlink, but it is not required for Revoke()

Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
2019-10-10 19:21:45 +05:30
Jiffin Tony Thottan 69e4144b0f objectstore: modify existing bucket policy for brownfield cases
Following corrections are needed for bucket policy to work properly

* Change Principal:{"AWS":["<username>"]} to Principal:{"AWS":["arn:aws:iam:::user/<username>"]}
* Add missing "PutObject" policy in Action[]
* Add <bucket/*> to Resource[] for accessing contents inside the bucket

Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
2019-10-10 19:21:17 +05:30
Sébastien Han 28a898d9f3 Merge pull request #4046 from eknudtson/osd-memory-target-fix
remove decimal point for osdMemoryTargetValue
2019-10-10 09:27:50 +02:00
Madhu Rajanna 0056e58ba6 csi: update cephfs registration directory name
when multiple CSI drivers are running in a cluster,
each should use unique socket for registration.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-10-10 10:52:27 +05:30