Commit Graph
1214 Commits
Author SHA1 Message Date
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
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
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 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
Sébastien Han 6fc6ea7a66 Merge pull request #4729 from ashangit/not_rr_osds_on_operator_restart
ceph: ensure crush-location osd command args is always the same to avoid useless osds restart
2020-01-21 18:08:38 +01:00
n.fraison 7bac027796 ceph: ensure crush-location osd command args is always the same
Currently each time the ceph operator restart, osds also restart.
This is due to a change in the crush-location args with location not ordered
At each restart the location order can change and lead to that kind of change in the osd deployment
104c105
<                             "--crush-location=root=default host=hostname datacenter=PAR pod=2 rack=2",
---
>                             "--crush-location=root=default host=hostname pod=2 rack=2 datacenter=PAR",
Sorting the topology to ensure stability of this command arg

Signed-off-by: n.fraison <n.fraison@criteo.com>
2020-01-21 15:04:16 +01:00
Sébastien Han ef8ef454c3 ceph: fix resources for prepare job
Now, we purely rely on what the user puts in the CR and apply it.
Prior to this commit we were putting 0 if not declared, this was not the
intentional.

Closes: https://github.com/rook/rook/issues/4713
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-21 14:37:28 +01:00
Sébastien Han 5c5dc5990c ceph: add mds_join_fs option to start mds
We now force the mds daemon to join the fs that was created by Rook.
This can always be changed by using the ceph config store.

Closes: https://github.com/rook/rook/issues/4707
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-20 09:59:18 +01:00
Sébastien Han 989df00602 ceph: add Pacific ceph version support
Since we know the name of the next Ceph release, let's incorporate that
knowledge into Rook.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-20 09:58:18 +01:00
Juan Miguel Olmo Martínez f62b2fa305 Ceph: MDS pod placement adheres to fault domain topology
With this modification is guaranteed that at least 1 MDS pod is going to be
placed in each of the available zones in the k8s cluster.
This would be improved in the future using:
<Pod Topology Spread Constraints> (still in alpha state since kubernetes V.1.16)

This modification obtain the number of zones in the k8s cluster and appends an
<antiaffinity> term using the topologyKey
<topology.kubernetes.io/zone> in the same number of MDS pods.
In the case that will be more MDS pods than zones, the <antiaffinity> term won't
be added in these extra pods.

Important Note:
The antiaffiniy term only will work with nodes labeled using the NEW label:
 <topology.kubernetes.io/zone> present in k8s V.1.17 clusters.
For previous versions of k8s clusters the label used is:
 <failure-domain.beta.kubernetes.io/zone>
And therefore, in this kind of clusters this modification won't work.

Resolves #4641

[test ceph]

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
2020-01-17 19:01:48 +01:00
Travis Nielsen f80ae4b292 Merge pull request #4692 from leseb/fix-4633
ceph: reset devicesInUse on orchestration error
2020-01-16 13:03:07 -07:00
Travis Nielsen 0033e9713b Merge pull request #4559 from ashishranjan738/monfixwq
ceph: Skipping quorum check if no. of ready mons is 0
2020-01-16 12:53:01 -07:00
Travis Nielsen 6ad62bebf4 Merge pull request #4688 from leseb/external-cluster-crash
ceph: ability to disable crash controller
2020-01-16 11:13:48 -07:00
Ashish Ranjan 44a4722155 ceph: Skipping quorum check if no. of ready mons is 0
If all mons are down (e.g. set the replicas to 0 on all the mon deployments) and the operator is restarted, the operator waits indefinitely for a single mon to start. This PR fixes this issue by skipping the quorum check of mons if the number of ready mon pods is equal to 0.

Signed-off-by: Ashish Ranjan <ashishranjan738@gmail.com>
2020-01-16 23:26:32 +05:30
Sébastien Han ed21121f87 ceph: remove devicesInUse
When the OSDs are being provisioned,
if one cluster has already provisioned the OSDs,
the new cluster will skip them since it will see they are already in use.
So we don't need this check anymore.
Coordinating the flag across multiple cluster instances is more complicated than it's worth.
Someone also might want useAllDevices: true in multiple clusters
and they would keep them on separate nodes by using the node labels and selectors.

Closes: https://github.com/rook/rook/issues/4633
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-16 17:09:22 +01:00
Sébastien Han bb214b2f27 ceph: ability to disable crash controller
A new CR setting has been introduced to disable the crash controller.
To disable it, add `disable: true` on the crashCollector section.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-16 16:05:22 +01:00
Travis Nielsen 9ce01c50c1 Merge pull request #4689 from leseb/rm-crush-dead-code
ceph: remove dead code for osd removal
2020-01-15 11:28:14 -07:00
Sébastien Han 81dd279062 Merge pull request #4653 from leseb/pick-14.2.6
ceph: bump to 14.2.6
2020-01-15 17:44:52 +01:00
Sébastien Han 260ef519d7 ceph: remove dead code for osd removal
This code is not used anymore, also fixing go-lint issues.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-15 12:41:34 +01:00
Sébastien Han dec0c7d4b0 ceph: bump to 14.2.6
14.2.6 is released, let's use it!

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-15 11:02:44 +01:00
Sébastien Han 4de61b01d4 ceph: fix external cluster crash k8s secret
The external cluster now creates the crash key when appropriate.

Closes: https://github.com/rook/rook/issues/4553
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-15 10:56:23 +01:00
rohan47 fda2b5d96c osd: Added check for --crush-location
Added a check for --crush-location, if --crush-location is not present,
the node topology is not applied and the operator will need to determine
the value based on the node labels instead of skipping this setting.

Signed-off-by: rohan47 <rohgupta@redhat.com>
2020-01-15 02:47:34 +05:30
Travis Nielsen e51428b9cb Merge pull request #4630 from Arnav15/replication_fix
yugabytedb: fixed replication factor flag and the master addresses.
2020-01-13 23:04:56 -07:00
Travis Nielsen 078e87a722 ceph: fix non-portable osd crush host name
The host name of an OSD in the CRUSH map should be the real
host name for non-portable OSDs. It was incorrectly being set
to the PVC name. Now the non-portable OSDs based on PVCs will
corretly have the host name set to the node name.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-01-13 12:17:49 -07:00
Travis Nielsen aacec0dcda ceph: simplify arguments to getConfigEnvVars method
The method to construct osd environment variables is simplified
by passing a struct param instead of individual params

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-01-13 12:15:15 -07:00