Commit Graph
5036 Commits
Author SHA1 Message Date
Travis Nielsen b6cf2c7ebf ceph: remove owner references to csi driver
The owner references for the csi driver are causing the csi driver
to disappear when the garbage collector rebuilds its references.
To unblock production clusters we remove the owner references
until we can find the correct fix for the owner references.
Neither the apiVersion of v1 or core/v1 is working.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-02-05 15:21:55 -07:00
Sébastien Han 1c3d449eb7 ceph: fail if no devices found
This will likely happen when re-running an orchestration and
bootstrapping a new cluster with unclean drives.
The prepare pod won't prepare nor list existing disks, thus the code
will later fail on reading disks properties.

Closes: https://github.com/rook/rook/issues/4810
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-02-05 22:16:26 +01:00
crombus 767f8d9c4c ceph: Fix md5 crypto to more secure sha256
This commit fixes md5 crypto to more efficent crypto
sha256 and fix test according sha256.

Closes: https://github.com/rook/rook/issues/4572
Signed-off-by: crombus <pkundra@redhat.com>
2020-02-05 22:31:47 +05:30
Rohan CJ eaab7b161d Ceph: Info log significant events in the nodedrain controller.
Info log events where a drain canary is either scheduled on a new node
or removed from a node.

Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2020-02-05 16:24:56 +05:30
Rohan CJ 9d1419864e Ceph: Improve detection of stale canaries.
In the case where the node disappears abrubtly,
there was nothing to trigger the nodedrain reconciler to clean up
the stale canary.

Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2020-02-05 16:21:22 +05:30
Maksim Nabokikh 7dc9ec1191 cassandra: JMX prometheus exporter
Export prometheus metrics for cassandra in sidecar container

Signed-off-by: Maksim Nabokikh <maksim.nabokikh@flant.com>
2020-02-03 11:40:38 +04:00
Travis Nielsen 57fb7cda2e Merge pull request #4714 from Madhu-1/log-level
CSI: Add LogLevel for csi templates
2020-01-31 11:54:32 -07:00
Travis Nielsen 28140cf0ff Merge pull request #4787 from travisn/annotations-merge
Allow for empty "all" annotations
2020-01-31 10:35:41 -07:00
Travis Nielsen bf28fb5f3b Merge pull request #4784 from leseb/enable-balancer
ceph: ability to enable the balancer module
2020-01-31 08:54:04 -07:00
Sébastien Han 4aab01b311 Merge pull request #4788 from travisn/csi-disappearing
ceph: fix garbage collection for csi driver
2020-01-31 16:37:13 +01:00
Travis Nielsen 16b2058432 ceph: allow for empty all annotations
When the annotations are generated for a ceph daemon,
the all annotations are merged with the component annotations.
If there are no all annotations, the component annotation
calculation was crashing. Now we check for the case where
the all annotations are not defined.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-01-31 08:09:44 -07:00
Travis Nielsen 48499115f8 ceph: fix garbage collection for csi driver
The CSI driver was disappearing in some clusters after certain events such
as restarting the operator or master nodes being restarted. This is due to
an incorrect owner reference on the csi driver back to the configmap. The
owner reference must specify core/v1 instead of v1 for the APIVersion
of the configmap. This issue is only hit when the k8s garbage collector
rebuilds its cache, which would happen at indeterminate times from
Rook's perspective.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-01-31 07:21:59 -07:00
Rohan CJ 9e479e8132 Ceph: Run make codegen
Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2020-01-31 16:21:39 +05:30
Sébastien Han 488b27a5b7 ceph: ability to enable the balancer module
The balancer module is a special module that needs particular actions to
be enabled.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1790500
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-31 11:33:41 +01:00
Madhu Rajanna 48a6e493e8 CSI: Add LogLevel for csi templates
Currently there is no option to turn on and off the
log level verbosity in csi containers, This PR adds
the functionality to select logging levels for csi containers.

Fixes: #4690

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-01-31 15:04:11 +05:30
Sébastien Han df3a8564b6 ceph: skip partitions depending on the ceph version
If we detect a partition we should not use it if the ceph version is not
at least 14.2.8 since it has the necessary changes to support partitions
with ceph-volume.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-30 18:49:34 +01:00
Sébastien Han 6a9f2aec82 Merge pull request #4777 from leseb/tune-slow-dev-fix
ceph: fix TuneSlowDeviceClass spec
2020-01-30 13:58:20 +01:00
Sébastien Han a60a18c477 ceph: fix TuneSlowDeviceClass spec
TuneSlowDeviceClass wasn't part of the StorageClassDeviceSet types but
only in VolumeSource which is not exposed in the CR spec so setting the
option would never work.
The only issue is that this apply to all volumeClaimTemplates
where each can point to a particular storage class...

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-30 11:59:18 +01:00
Sébastien Han 458ee5b691 ceph: add missing codegen for CephVersion
CephVersion was added recently in types.go but the codegen wasn't
applied.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-30 11:59:18 +01:00
Nizamudeen 4b55a74ac4 ceph: Implementing Conditions on rook-ceph
Fixed conditions getting resetted after the operator restart.
Did the changes which required to implement conditions on the rook ceph cluster
Conditions will eliminate the current status.State and incorporates a type which
provides much more description to the current status of the cluster.

Signed-off-by: Nizamudeen <nia@redhat.com>
2020-01-30 10:21:11 +05:30
Travis Nielsen 0a684fa84c Merge pull request #4549 from jmolmo/issue_3764
Ceph: Assure mon canary pods deletion
2020-01-29 12:32:03 -07:00
Travis Nielsen bd3c618cef Merge pull request #4767 from Madhu-1/nil-check
ceph: Add nil check for ceph version
2020-01-29 11:59:53 -07:00
Dmitry Yusupov b4139b364e Merge pull request #4766 from SergeyKaydalov/edgefs-resources-fix
edgefs: memory/CPU resources limits fix
2020-01-29 09:17:33 -08:00
Juan Miguel Olmo Martínez b4ae856c70 Ceph: Assure mon canary pods deletion
If for any cause the operator processing a mon failover is restarted, the
mon canary pods created in order to get the right placement for this
kind of pods can remain in <pending> state forever.

The following labels have been added to the mon canary deployments:
"mon_type" = "canary"
"canary_pvc_name" = <PVC name used for the canary pod>

A separate <removeCanaryDeployments> has been implemented for
removing the dependence of the variable <canaryCleanup>.
This function uses the <canary> labels to obtain the <real>
and <existing> list of mon canary deployments in any moment.

This change, by itself, will avoid most of the problems with
pending canary pods, but as second safe guard measure a call to this
function has been added in the health check, to <force> a canary pod
deletion if the cluster of monitors is healthy and complete (this implies
that no canary pods should be present)

Resolves #3764

[test ceph]

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
2020-01-29 17:13:15 +01:00
Madhu Rajanna 34e1585f54 ceph: Add nil check for ceph version
as CephVersion is pointer added a nil check
for CephVersion in status to avoid panic.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-01-29 19:34:30 +05:30
Sergey Kaydalov db788da967 edgefs: trlogKeepDays is a fractional value
The trlogKeepDays has to expressed as a fraction of a day: 0.5, 0.1 and etc

Signed-off-by: Sergey Kaydalov <kayserg@gmail.com>
2020-01-29 13:03:13 +02:00
Sergey Kaydalov 1d468f4c65 edgefs: fix in resouse exposal code.
User-specified memory and CPU limits are provisioned into a target container.

Signed-off-by: Sergey Kaydalov <kayserg@gmail.com>
2020-01-29 13:03:13 +02:00
Sébastien Han 98aff03098 ceph: bump raw block mode support to 14.2.8
14.2.7 will only be a CVE fix release so 14.2.8 is the release that will
contain the fixes for ceph-volume partition.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-29 09:12:44 +01:00
Travis Nielsen ec7f06b52b Merge pull request #4680 from jmolmo/mdszones
Ceph: MDS pod placement adheres to fault domain topology
2020-01-28 16:19:53 -07:00
Madhu Rajanna 1cab0985d5 CSI: Add log if the CSI volume expansion is not supported
Added warning log in opeartor, if csi volume
expansion is not supported.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-01-28 23:50:23 +05:30
Madhu Rajanna cf16184899 CSI: Add support for CSI volume expansion
This PR makes the necessary changes required
for volume expansion support for both cephfs and
rbd.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-01-28 23:50:23 +05:30
Madhu Rajanna 8c1a90ca01 CSI: upgrade node-driver-registrar from v1.1.0 to v1.2.0
latest released upstream version is v1.2.0,this
PR updates it to latest releasd version.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-01-28 23:50:15 +05:30
Madhu Rajanna 06d2dd2994 CSI: update csi-attacher from v1.2.0 to v2.1.0
external-attacher v2.x is not compatible with v1.x
This PR makes the require changes in csi templates
and upgrade documentation for easily upgrade

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-01-28 23:46:24 +05:30
Madhu Rajanna 0abb3b9e1b CSI: update ceph-csi image tag to v2.0.0
ceph-csi v2.0.0 is released. This commit updates
the image tag to latest released ceph-csi version

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-01-28 12:20:13 +05:30
Travis Nielsen d40cb217ae Merge pull request #4694 from egafford/secure-port-for-ceph-object-manifests
ceph: add securePort values for objectstore integration tests
2020-01-27 14:49:47 -07:00
Elise Gafford d7906266e1 ceph: remove validation on SecurePort for k8s <= 1.13
Versions of k8s prior to 1.14 do not support the nullable field in
CRD properties. As k8s 1.13 remains part of our support matrix and
as this field must remain nullable, we must remove CRD validation
of SecurePort. Range validation of this field has been moved into
the logic of rgw.validateStore.

Fixes: #4693
Signed-off-by: Elise Gafford <egafford@redhat.com>
2020-01-27 13:49:35 -05:00
Sébastien Han d7a9409a9e Merge pull request #4606 from ashangit/set_pod_placement
ceph: create a generic setPodPlacement used by mon and gateways
2020-01-27 14:58:59 +01:00
n.fraison 383299c5f5 k8sutil: refacto pod anti affinity placement used by ceph mon and gateways
Code for pod anti affinity mechanism on ceph gateways is a duplica of the one used by ceph mon.
This is a refacto to use same code on both components

Signed-off-by: n.fraison <n.fraison@criteo.com>
2020-01-27 09:58:50 +01:00
Sébastien Han caa8382e25 ceph: do not update deployment if no changes
We know use k8s-objectmatcher to verify whether a deployment is going to
change or not.
This avoids calling Update() from k8s utils which takes time to run.

Closes: https://github.com/rook/rook/issues/4519 and https://github.com/rook/rook/issues/4642
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-24 17:02:40 +01:00
Sébastien Han 92c1696bfc ceph: cleanup/trim isUpgrade variable a bit
We now always perform ok-to-stop change when the deployment is going to
be updated. This could be for various reasons like change in the spec or
a new Ceph image.
In any case, if Ceph resources are going to be restarted this must be
done carefully.

Also trimmed the isUpgrade variable, the upcoming commit will remove the
need of that variable.

Keeping isUpgrade from the controller code since we need it to detect
whether an orchestration upgrade should be triggered or not (based on
the ceph cluster status).

Also, we keep it on the child controllers so we don't go into an
orchestration phase if the cluster image hasn't changed. The child does
not need to be updated/go into its orchestration phase because the
cluster CR changed.

Closes: https://github.com/rook/rook/issues/4379
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-24 17:02:37 +01:00
Sébastien Han a8cd184aa1 Merge pull request #4629 from egafford/add-ceph-version-to-cluster-status
ceph: add ceph version to cluster status
2020-01-24 16:42:11 +01:00
Elise Gafford b19f8d4989 ceph: add ceph version to cluster status
In order for deployments managed outside the immediate scope of
the ClusterController to accurately detect the Ceph version of
their images, the ClusterController must store the detected
version. This change records the Ceph version as part of the
cluster status and modifies the crashcollector deployment to
consume this field to record its own Ceph version. This replaces
an earlier solution to this problem in which the Ceph version
for a given image to version mapping was stored in a global
in-memory map by the operator.

Resolves: rook#4357
Signed-off-by: Elise Gafford <egafford@redhat.com>
2020-01-24 09:22:48 -05:00
Sébastien Han 227d2d527a ceph: osd store refactor
Multiple things:

1. We removed all the function/methods/tests that were used to
create and manage rook legacy OSDS as well as bringing support to
Bluestore OSD only.
It also fixes various go-lint issues in the respectives files.

2. use c-v inventory to detect available devices:
Now we rely on the 'ceph-volume inventory' command to tell us if a
device is available or not.

3. implement raw mode for osd on pvc
When an OSD will be bootstrap on a PVC, the new c-v raw mode will be
used. It consists of putting block, db and wal under the same device.
Here LVM is out of the picture and the raw device is used as is. The
implementation is backward compatible so existing OSD on PVC will LVM
will continue to operate.

Closes: https://github.com/rook/rook/issues/4363
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-23 19:13:09 +01:00
Sébastien Han 749ef5fe76 Merge pull request #4723 from leseb/mds_join_fs
ceph: add mds_join_fs option when running mds daemon
2020-01-23 11:30:38 +01:00
Sébastien Han 57a0dcea7f Merge pull request #4712 from xdsxc/device-filter-log-messages
osd: fix misleading log messages when matching device filters
2020-01-23 10:18:28 +01:00
Dustin Guerrero 4ff18d148a osd: fix misleading log messages when matching device filters
This removes a misleading log message that implies device filters
match when they do not.

Signed-off-by: Dustin Guerrero <dguerrero@twilio.com>
2020-01-22 09:58:09 -08:00
Sébastien Han 19350d6268 Merge pull request #4725 from eliaswimmer/fix_4717
ceph: fixed #4717 Ceph external cluster, repeatedly saving mon endpoi…
2020-01-22 16:49:25 +01:00
Elias Wimmer 70f312e35d ceph: fixed #4717 Ceph external cluster, repeatedly saving mon endpoints to config
Before, every few seconds the config files for the cluster where written to disk.
Even when there were no changes in the clusters monitors.

Fixes: https://github.com/rook/rook/issues/4717
Signed-off-by: Elias Wimmer <elias.wimmer@tuwien.ac.at>
2020-01-22 15:15:56 +01:00
Sébastien Han 2292b67127 Merge pull request #4734 from leseb/fix-4686
ceph: fix external cluster config override cm creation
2020-01-22 14:42:40 +01:00
Sébastien Han f59bdd626a ceph: fix external cluster config override cm creation
If an image is specified in the external cluster CR, the
'rook-ceph-config' config map will be created and then child CRs like
rgw/mds/nfs can be created.

Also, calling config.GetStore() was a mistake since it's calling by the
health check if new mons are being added to clusterInfo.

Closes: https://github.com/rook/rook/issues/4686
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-22 14:01:20 +01:00