Commit Graph
892 Commits
Author SHA1 Message Date
travisn 57d446ec6f ceph: osds to always use hostname for node selector
The node selector for running OSDs on PVCs was using the node name
rather than the node's hostname. In clusters where the node name
is different from the hostname this would cause the osd daemons
to be in pending state indefinitely. Now the node selector will
use the hostname as expected.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-09-19 16:01:52 -06:00
Travis Nielsen 30fe718a97 Merge pull request #3907 from leseb/c-v-debug-log
ceph: enable ceph-volume debug logs
2019-09-19 12:19:20 -06:00
Sébastien Han 087d71106b ceph: add a new CR property to force upgrades
On rare occasion, the ceph checks might not be 100% correct and the user
might decide to force an upgrade anyway.
Correctly, if we are in an upgrade, we perform `ok-to-stop` check for
each daemon, if one of them fails, we retry and eventually fail.
They are corner-cases where users would like to force the upgrade anyway.

Enhance the new CR property: "skipUpgradeChecks: true".

Closes: https://github.com/rook/rook/issues/3872
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-19 10:55:56 +02:00
Sébastien Han c96fe8b5f8 ceph: enable ceph-volume debug logs
It's fine to enable debug logs from c-v, it's not so verbose and really
useful when debugging.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-18 13:55:18 +02:00
Sébastien Han 11640f030a Merge pull request #3822 from krig/ceph-dashboard-port
Ceph: Use HTTP port if SSL is disabled
2019-09-18 11:29:56 +02:00
Travis Nielsen 6469b06f0a Merge pull request #3870 from leseb/fix-cmd
ceph: fix upgrade commands
2019-09-17 23:24:55 -06:00
Travis Nielsen 480312c976 Merge pull request #3889 from leseb/use-v14.2.4-20190917
ceph: bump to v14.2.4
2019-09-17 16:56:51 -06:00
travisn 60290943ef ceph: ensure the csi secret exists on upgrade
The CSI secret was only being created for new clusters.
Upgraded clusters did not have the secret generated. To support
upgraded clusters to use CSI, we always ensure the csi secret
exists when the orchestration runs.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-09-17 12:15:37 -06:00
Sébastien Han 171c4ac438 ceph: fix upgrade commands
Several commands were not using the cli finalizer function which builds
up the right argument to run a ceph command. This was working on the
operator since it used to have an /etc/ceph/ceph.conf file so we could
ran the command without specifying the ceph conf and key paths.
However, we recently removed that and it silently broke this "already"
broken code :).

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-17 18:59:42 +02:00
Blaine Gardner 908675bb17 Merge pull request #3847 from leseb/more-pg-autoscaler
pg autoscaler and osd bluefs fixes
2019-09-17 09:43:55 -06:00
Sébastien Han d3104ed47b Merge pull request #3879 from ashishranjan738/mdbfix
fix(fencing): changes mdb controller to use namespace for checking ceph status
2019-09-17 15:34:59 +02:00
Sébastien Han bc6dcb9995 ceph: bump to v14.2.4
v14.2.4 just got released so let's use it.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-17 15:08:15 +02:00
Sébastien Han f7df86df16 Merge pull request #3569 from galexrt/docs_improve
docs/ceph: add list of unusable directories paths
2019-09-17 12:20:01 +02:00
Ashish Ranjan c4ee336fe0 fix(fencing): change mdb controller to use namespace for checking status
This commit changed mdb controller to make use of cephCluster's namespace instead of cephCluster's name for checking the ceph health as the ceph config is located in the cephCluster's namespace folder which can makes mdb controller fail when rook operator is deployed in any other namespace apart from rook-ceph.

Signed-off-by: Ashish Ranjan <aranjan@redhat.com>
2019-09-17 11:46:54 +05:30
Travis Nielsen 5295dfb200 Merge pull request #3844 from leseb/nfs-needs-mds
nfs: fail if no mds are running
2019-09-16 18:11:40 -06:00
Sébastien Han c0843f2184 nfs: fail if no mds are running
In order to run ganesha exporting cephfs we must have an MDS server
running. So, we check if the pool was created.
If not present we fail the instanciation of the CR.

Closes: https://github.com/rook/rook/issues/3835
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-16 09:48:58 +02:00
Sébastien Han 22c9c3a813 ceph: disable bluestore warn on legacy statfs
When upgraded to Octopus or 14.2.5, OSDs will fix themselves on the fly at
startup, so we just need to silence this warning for now.
No migration is needed.

Closes: https://github.com/rook/rook/issues/3539
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-16 09:33:00 +02:00
Kristoffer Grönlund d67ef2bcdd Ceph: Use HTTP port if SSL is disabled
Using port 8443 / dashboardHTTPS when not running HTTPS
is confusing, so use the dashboardHTTP port (7000 by
default) instead.

Also don't expose the dashboard port as "https-dashboard"
when not using https, instead expose as "dashboard".

Resolves #3810

Signed-off-by: Kristoffer Grönlund <kgronlund@suse.com>
2019-09-16 09:29:39 +02:00
Sébastien Han 11d3831d74 ceph: more mgr autoscaler option
Now that the pg_autoscaler is on by default, it is "normal" (and okay) to
have a small number of PGs in the cluster if the overall cluster usage is
also low. This setting just results in a health warning out of the box
when you create a pool and haven't written any data yet.

fyi: ceph upstream https://github.com/ceph/ceph/pull/30352

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-13 18:31:42 +02:00
Sébastien Han 5b930872b9 ceph: make lifecycle hook chown less verbose
It looks like on large store, the `--verbose` option is going over grpc
message buffer, since the output might be quite big.

See the error:

([chown --recursive --verbose ceph:ceph /var/log/ceph /data/rook-storage/osd11]) for
 Container "osd" in Pod "rook-ceph-osd-11-85dbbb5cd6-djttp_rook-ceph(4bf77ccd-d631-11e9-8334-fa163ed365ca)" failed - error: rpc error: code = ResourceExhausted desc = grpc: trying
to send message larger than max (15133688 vs. 8388608), message: ""

Removing the verbose flag should fix this.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-13 18:08:52 +02:00
Alexander Trost 0827df646a docs/ceph: add list of unusable directories paths
This adds a list of unusable directories paths to the Ceph Cluster CRD
doc page and the Ceph operator validation code. Reason for adding these
directories is that they are causing errors during Ceph OSD deployment.
Example: When an user wants to use `/rook` as a directory for an OSD,
the cluster deployment fails because the `mountPath`s must be unique:
```
Job.batch "rook-ceph-osd-prepare-NODE" is invalid: spec.template.spec.containers[1].volumeMounts[4].mountPath: Invalid value: "/rook": must be unique
```

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2019-09-13 14:06:32 +02:00
Sébastien Han 36d6120c3d Merge pull request #3819 from ashishranjan738/codefix
[Disruption logging]: Wrap the openshift fencing reconcilers with error loggers.
2019-09-12 11:04:49 +02:00
Sébastien Han af60060704 Merge pull request #3626 from jmolmo/issue-3603
Set "ssl_server_port" dashboard setting if it is present in ceph dashboard config
2019-09-12 09:52:44 +02:00
rohan47 a4639ae541 Changed the OSD DOWN message to debug level
We want the OSD DOWN message to be shown when debug option is set to
true in the rook-ceph operator.

Signed-off-by: rohan47 <rohgupta@redhat.com>
2019-09-10 22:06:48 +05:30
rohan47 fcbce4898c Set the Command property for the OSD prepare init container blkdevmapper
If a Ceph container image is specified which has a entrypoint then the
Init container for osd prepare job blkdevmapper will fail. So set the
Command property.

Signed-off-by: rohan47 <rohgupta@redhat.com>
2019-09-10 22:05:50 +05:30
Ashish Ranjan 651efc26b1 Disruption: Wrapped the reconcile logic with a secondary reconcile func
This commit wraps the existing reconcile logic for mdb and machinelabel controller with a secondary reconcile func for better logging as rook's logging mechanism is not compatible with controller-runtime logging interface.

Signed-off-by: Ashish Ranjan <aranjan@redhat.com>
2019-09-10 13:28:55 +05:30
Travis Nielsen 6e4b40b842 Merge pull request #3786 from rohantmp/drainFix
Fix: only schedule node drain canaries on nodes with osds
2019-09-09 22:53:15 +03:00
Juan Miguel Olmo Martínez 4700193b1f ceph: dashboard - get right ssl port from ceph settings
Starting with Nautilus 14.2.1 the dashboard SSL port is readed from <<mgr/dashboard/ssl_server_port>> ceph setting.
Previous versions use the port specified in <<mgr/dashboard/server_port>>

Addressed @travisn suggestion about use of <ssl> attribute in conditional.
This suggestion drove me to change the type of the SSl attribute (from *bool to bool) in the DashboardSpec Struct.
This makes code more clean/safe and make sure that the SSL atribute has always a meaningful value.

Now if you want to run the <secure dashboard> you need to set explicitly SSL to true, as is demonstrated in unit tests.

[x] Code generation (make codegen) has been run to update object specifications

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
2019-09-09 11:08:17 +02:00
travisnandAshish Ranjan 638b591535 ceph: Adds support for MDB controller and machineLabel controller
Add support for MachineDisruptionBudget controller and MachineLabel controller required for fencing
in OpenShift. This will ensure that machines are only fenced and OSDs are only stopped
when Ceph is in a healthy state.

Co-authored-by: Ashish Ranjan <aranjan@redhat.com>
Signed-off-by: travisn <tnielsen@redhat.com>
2019-09-06 16:32:06 -06:00
Travis Nielsen 49c516916e Merge pull request #3781 from rohantmp/topology
Fix topologyAware on PVC-based OSDs
2019-09-06 13:59:22 -06:00
Travis Nielsen fe4874dc77 Merge pull request #3769 from leseb/mgr-modules
Ceph: Ability to enable pg_autoscaler mgr module via CRD
2019-09-06 13:34:05 -06:00
Travis Nielsen c2aec9ea41 Merge pull request #3780 from Madhu-1/csi-v1.2.0
Use v1.2.0 ceph-csi version
2019-09-06 12:58:27 -06:00
Rohan CJ f8b7537830 Fix topologyAware on PVC-based OSDs
Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2019-09-06 23:17:01 +05:30
travisnandSébastien Han c30cc697c7 ceph: ability to enable mgr module via CRD
We can now enable via the cluster CR any manager module with a
setting under the new mgr element

mgr:
  modules:
  - name: pg_autoscaler
    enabled: true

Co-authored-by: Sébastien Han <seb@redhat.com>
Co-authored-by: travisn <tnielsen@redhat.com>
Signed-off-by: travisn <tnielsen@redhat.com>
2019-09-06 11:32:51 -06:00
Blaine Gardner cb3107a303 Merge pull request #3775 from SUSE/lower-builtin-osd-mem-requests
Ceph osd: lower OSD pod minimum mem to 2Gb
2019-09-06 10:50:12 -06:00
Dmitry Yusupov 91ed971b58 Merge pull request #3785 from dyusupov/master
support for mdpsize
2019-09-06 08:33:12 -07:00
Travis Nielsen cb5143555d Merge pull request #3779 from sp98/fix-osd-failure-on-pvc
fix random OSD daemon pod failures when running OSD on PVC
2019-09-06 06:59:57 -06:00
Rohan CJ 7d3f313cab clusterdisruption: Bypass crush location cache if active failureDomain is not populated
Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2019-09-06 09:43:48 +05:30
Rohan CJ e1bd6595d7 Fix: only schedule node drain canaries on nodes with osds
Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2019-09-06 09:41:56 +05:30
Dmitry Yusupov 2282e956d9 support for mdpsize
Signed-off-by: Dmitry Yusupov <dmitry.yusupov@nexenta.com>
2019-09-05 18:13:56 -07:00
Blaine Gardner 6ff70be8f0 Ceph osd: lower OSD pod minimum mem to 2Gb
Some users have reported issues running Ceph OSDs in environments
without beefy systems. After consulting with Ceph experts, we believe
2Gb is still a safe minimum for Ceph for users with more modest systems
that won't result in disfunction in Ceph.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-09-05 15:24:33 -06:00
Blaine Gardner 3a243d2978 ceph: remove configOverride functionality from CRD
After further consideration and working with the feature for a few
weeks, the `configOverride` functionality seems to be more complexity
than is worth it for the expected benefit. Users still have the most
preferred option of setting configs in Ceph's config database using
`ceph cofig set` or the dashboard, and the override ConfigMap still
exists for fallback scenarios. The config database can still be used
by Rook for setting necessary configs, but the user has no way of
telling Rook to do so.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-09-05 12:30:56 -06:00
Santosh Pillai ead0653068 fix random OSD daemon pod failures when running OSD on PVC
OSD pods when running on PVC fail randomly due to some race condition:
 - OSD daemon pod was activating the volume group using vgchange -an without any volume group name.
 - This caused the pods to fail randomly when number of OSDs is more, say greater than 10.
 - This fix adds Volume group name while activating/deactivating volume groups to fix this

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2019-09-05 20:34:03 +05:30
Madhu Rajanna b64768ee39 Use release ceph-csi version
replace canary tag with release ceph-csi
v1.2.0 tag

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-09-05 16:10:30 +05:30
Sébastien Han 41fec6bedd Merge pull request #3770 from leseb/use-14.2.3
ceph: bump to 14.2.3
2019-09-05 09:45:49 +02:00
travisn 533ac5b693 ceph: refactor version detection of external cluster
Reduce the duplication of detecting the version of the external cluster
by refactoring to a single method that retrieves and validates the
version

Signed-off-by: travisn <tnielsen@redhat.com>
2019-09-04 19:02:08 -06:00
Sébastien Han bc1a5a9037 ceph: external create 'rook-config-override' cm
This configmap is needed by RGW and MDS pods, if it's not present we
won't be able to start any of them.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-04 19:02:08 -06:00
Sébastien Han 9c1bb7c62d ceph: external be a bit more flexible on upgrade
Add various upgrade tests so that the local cluster does not fail if
an upgrade is available on the external cluster.

Also, add better upgrades handling on update and on add. We now rely as
much as possible on a unique function that works both local and external
cluster 'detectAndValidateCephVersion()'. So the code will act the same
way wether a CR update is triggered or if the operator is restarted.

The health check now reports any topology changes on the external
cluster such as odd number of mons and low number. It will also detect
if the external cluster has been upgraded and will log that information,
  helping the admin in his/her decision to trigger an image upgrade.

Finally, we prevent the creation of new CRs if the external cluster
version has a higher major number than the local one.

Closes: https://github.com/rook/rook/issues/3731
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-04 19:02:08 -06:00
Sébastien Han aa0e522524 ceph: remove dead code
These functions were not used anywhere, so removing them.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-04 19:02:08 -06:00
Sébastien Han 3390a85404 ceph: bump to 14.2.3
Let's use the latest minor release of Ceph 14.2.3.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-09-04 23:14:28 +02:00