Commit Graph
1190 Commits
Author SHA1 Message Date
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 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
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
Arnav Agarwal 11244925ed yugabytedb: added single rf container command test
adds test to verify container create command with RF=1

Signed-off-by: Arnav Agarwal <14933889+Arnav15@users.noreply.github.com>
2020-01-10 15:02:14 -08:00
Travis Nielsen 9a078bf9e6 minio: remove from rook
The minio operator has not had community support nor
any updates since being added to Rook. Support is being
removed from Rook due to this lack of community interest.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-01-08 15:45:21 -08:00
Travis Nielsen 044140fc1a Merge pull request #4626 from SUSE/topology-label
core: k8s 1.17 zone/region failure domain labels
2020-01-08 15:23:18 -08:00
Arnav Agarwal 17d5ab65a5 yugabytedb: fixed replication factor flag and the master addresses.
This PR fixes the replication factor flag for yugabytedb deployments.

Signed-off-by: Arnav Agarwal <14933889+Arnav15@users.noreply.github.com>
2020-01-07 19:49:41 -08:00
Dmitry Yusupov 66779092a0 Merge pull request #4623 from nizamial09/var_shadow
edgeFS: Took care of the Variable shadowing in ConfigMap
2020-01-07 14:18:41 -08:00
Sébastien Han 05aa639317 ceph: add option to continue on unclean PGs
A new CRD option `continueUpgradeAfterChecksEvenIfNotHealthy` is added.
When upgrading, Rook goes OSD by OSD and then waits for PGs to be clean
before proceeding to the next OSD. Currently, Rook waits for 5 hours but
there might be circumstances where PGs need more time to settle.
Thus setting `continueUpgradeAfterChecksEvenIfNotHealthy` to true will
pursue the upgrade process, even if PGs are not 100% active+clean.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1786029
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-01-07 12:18:54 -07:00
Blaine Gardner facc473f59 core: k8s 1.17 zone/region failure domain labels
Add support for the k8s 1.17 official zone/region failure domain labels.
Our earlier guess that the official labels would be
<failure-domain.kubernetes.io> was wrong; the official is now
<topology.kubernetes.io>.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2020-01-07 11:52:28 -07:00
Travis Nielsen 43a66f2a8b Merge pull request #4621 from travisn/operator-kit-dependency
Remove operator kit dependency
2020-01-07 11:03:28 -07:00
Travis Nielsen 7fa0032027 Merge pull request #4585 from jmolmo/issue_4567
ceph: Avoid invalid execution state
2020-01-07 10:05:15 -07:00
Travis Nielsen d0c7d28a63 build: remove operator kit dependency
The operator kit had more utility originally when the operator
was creating and managing the TPRs and CRDs directly. Since
the CRDs are now created from a manifest and no longer by the
operators, the utility of operator kit is limited to the
controller watcher. Since we are moving to the controller runtime
we simplify the code to make the transition smoother. Now
there is only a simple WatchCR method that will need to be
replaced as we maek that transition.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-01-07 08:30:14 -07:00
Nizamudeen 700d280971 edgeFS: Took care of the Variable shadowing in ConfigMap
This commit fixes the variable shadowing in configMap which leads to a potential misconfiguration.

Resolves: https://github.com/rook/rook/issues/4563

Signed-off-by: Nizamudeen <nia@redhat.com>
2020-01-07 12:04:34 +05:30
Nizamudeen 729b883dc8 ceph: Generating a strong ceph dashboard password
Replaced `math/rand` with more secure `crypto/rand` which will generate CSPRNG.
Changed the length of dashboard password from 10 to 20 and included more special characters that can strengthen password.

Passwords before this change: QoMmqLkaOf,8tqTyWF1sZ
Passwords after this change: L{QZ@_c'Rl7$uvW:UHU1, fP-OjX`UVw0J0Ka/scS(

Resolves: https://github.com/rook/rook/issues/4571

Signed-off-by: Nizamudeen <nia@redhat.com>
2020-01-06 15:44:23 +05:30
Dmitry Yusupov d90d2411bc Merge pull request #4600 from nizamial09/fix_logic_finalizer_1
edgeFs: Fix logic of error handling in the finalizer method
2020-01-02 05:11:31 -08:00
Nizamudeen e92e7e1bb1 edgeFs: Fix logic of error handling in the finalizer method
If obj is not successfully cast into an e dgefsv1.Cluster, ok will be false, resulting in the .Update(cluster) operation not running, and the declared err variable retaining its default nil value. Subsequently, a check against err is performed, which will evaluate to false, resulting in logging the finalizer as removed when it in fact was not.

Signed-off-by: Nizamudeen <nia@redhat.com>
2020-01-01 15:08:14 +05:30
Sébastien Han 4224f84d7c ceph: osd add missing ROOK_CEPH_MON_HOST env
The ROOK_CEPH_MON_HOST env var was missing from the pod env so the
CEPH_ARGS won't be populated correctly.

Closes: https://github.com/rook/rook/issues/4558
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-12-23 16:15:46 +01:00
Juan Miguel Olmo Martínez 5f1c95002b ceph: Avoid invalid execution state
security issues identified by TrailOfBits:

Improperly handled type assertion error could result in invalid
execution state.
If we obtain an error trying to get a Node object is better not
continue executing this function.

Resolves #4567

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
2019-12-23 11:44:18 +01:00
Sébastien Han 7d11524643 ceph: add missing vol mount for encrypted osds
"ceph-volume activate" on encrypted osds needs a ceph.conf as well as
connectivity to the mons. This commit adds that to that "activate-osd"
init container.

Closes: https://github.com/rook/rook/issues/4558
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-12-23 09:59:04 +01:00
Sébastien Han 805e606cce Merge pull request #4508 from bsperduto/hotfix/objectBucketClaimPort
ceph: fix object bucket provisioner when rgw not on port 80
2019-12-20 10:37:23 +01:00
Travis Nielsen dfabccc2ee ceph: rehydrate the osd CRUSH location for PVCs
The OSDs on PVCs were changing location in the CRUSH
hierarchy after an operator restart due to the location
property not being re-discovered on the OSD daemon.
Since OSDs on PVCs do not run the prepare pod again
to discover this property, the operator must read it
off the existing osd deployment. The operator was
reading other properties, but now will read the location
as well.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-12-18 15:10:24 -07:00
Sébastien Han 8f00654ade Merge pull request #4518 from travisn/is-upgrade
Only perform upgrade checks when the image changes
2019-12-17 23:12:14 +01:00
Travis Nielsen f48e0948ee Merge pull request #4355 from ashishranjan738/status
enhance(ceph): Adds status field for ceph related CRs
2019-12-17 11:57:20 -07:00
Travis Nielsen b79c223986 ceph: only set isUpgrade when the image changes
The isUpgrade flag was being set every time the operator
was started. This caused the upgrade checks to be run every
time the operator restarted. Thus, if any mons were down,
you likely would get stuck on the upgrade checks since another
mon could not be stopped. We need to rely on the upgrade being
detected either by a different image name from the cluster CR
update, or from different versions of the daemons running
in case the operator was restarted in the middle of an upgrade.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-12-17 10:57:26 -07:00
Ashish Ranjan 8274aa2426 enhance(ceph): Adds status field for ceph related CRs
This commit adds status field for ceph related CRs which will be useful for knowing the ceph component status without checking the logs.

Signed-off-by: Ashish Ranjan <ashishranjan738@gmail.com>
2019-12-17 12:01:17 +05:30
Madhu Rajanna 8be3cdd10e CSI: cephfs and rbd daemonset upgrade strategy
CSI nodeplugins, specifically when using cephfs FUSE or
rbd-nbd as the mounters, when upgraded, will
cause existing mounts to become stale/not-rechable
(usually connection timeout errors).

This is due to losing the mount processes running within the
CSI nodeplugin pods.

This PR add updated the Daemonset update strategy
based on the ENV variable to take care of above issue
with some manual steps

Moreinfo: https://github.com/ceph/ceph-csi/issues/703

Resolves: https://github.com/rook/rook/issues/4248

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-12-16 23:15:56 -07:00