Commit Graph
11197 Commits
Author SHA1 Message Date
Travis Nielsen b7a564e929 Merge pull request #2986 from rohantmp/mainMon
Ceph: Set noout on cluster when storage nodes are in maintenance
2019-04-17 09:56:50 -06:00
Travis Nielsen 6996571b5c Merge pull request #3005 from leseb/osd-mem-tune
ceph: osd, do not auto tune osd-memory-target
2019-04-17 09:56:03 -06:00
Rohan CJ 894f4bffbd - Set noout on cluster when storage nodes are in maintenance (unschedulable)
- Add noout functions to osd client
- export the functions DiscoverStorageNodes,GetAllStorageNodes
  from pkg/operator/ceph/cluster/osd
- Update PendingReleaseNotes.md

Signed-off-by: Rohan CJ <rohantmp@gmail.com>
2019-04-17 19:31:55 +05:30
Alexander Trost ea03048ef1 Merge pull request #2831 from galexrt/feature_2308
crds: Set annotations pods, deployments and so on
2019-04-17 10:27:14 +02:00
Kaushal M 2e274b306a ceph: Use aggregated ClusterRoles
The ClusterRoles in the manifests (and helm chart) for the ceph provider
have been updated to use [aggregated ClusterRoles][1].

All ClusterRoles have been split into 2 ClusterRoles.
An aggregated ClusterRole without any rules, named the same, but with an
aggregationRule that matches labels in the format
'rbac.ceph.rook.io/aggregate-to-<ClusterRole name>: "true"'.
A second ClusterRole which contains the existing rules named
'<ClusterRole name>-rules', with label
'rbac.ceph.rook.io/aggregate-to-<ClusterRole name>: "true"'.

These two ClusterRoles give the same behaviour as the previous
ClusterRole.

Additional rules to a ClusterRole can now be provided by creating a new
ClusterRole with the correct label. This should help make updates
simpler.

Fixes #2634.

[1]: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#aggregated-clusterroles

Signed-off-by: Kaushal M <kshlmster@gmail.com>
2019-04-17 13:00:21 +05:30
Travis Nielsen 33c8269e22 Merge pull request #2983 from bigbitbus/feature/improve-ceph-example
Improving ceph-examples-md
2019-04-16 21:38:38 -06:00
Travis Nielsen 1562fdd7d9 Merge pull request #2946 from noahdesu/hotpluggin
ceph udev monitor / hotpluggin
2019-04-16 21:31:54 -06:00
Travis Nielsen 60c50a4de2 Merge pull request #2993 from travisn/ceph-volume-logging
Write ceph-volume log entries as they occur
2019-04-16 21:31:18 -06:00
Travis Nielsen 0c13084746 Merge pull request #2991 from SUSE/mds-fix-upgrade
ceph mds: update keyring before deployment update
2019-04-16 16:59:24 -06:00
Sébastien Han f0b0f340f8 ceph: osd, do not auto tune osd-memory-target
As per https://github.com/ceph/ceph/pull/26856 Ceph tunes the value of
osd-memory-target when running the OSD process so there is no need to
enforce it.

We also set a safety factor to that value which has been calculated by
the Ceph eng/perf team. Without this factor, the OSD will get OOM killed
since it is consuming memory for other purposes too.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-04-17 00:14:04 +02:00
travisn aae4d7c7f6 osds: write ceph-volume log entries as they occur
When ceph-volume is called, the default python logging will buffer everything until
the process exits, which means the pod log doesnt show what is happening
until ceph-volume is done. This change will allow logs to be written
immediately as tasks are performed inside ceph-volume

Signed-off-by: travisn <tnielsen@redhat.com>
2019-04-16 15:47:05 -06:00
Travis Nielsen 847142c422 Merge pull request #2995 from Madhu-1/corrrect-csi-doc
rearrange RBD resource cleanup order in ceph-csi doc
2019-04-16 15:42:48 -06:00
Travis Nielsen 3869f4062d Merge pull request #2893 from noahdesu/ceph-lvs-speed
ceph/osd: mount /run/udev for lvs speedup
2019-04-16 15:41:50 -06:00
Travis Nielsen dc3af9a537 Merge pull request #3002 from noahdesu/skip-early-orch
ceph: skip orch on non-ready clusters
2019-04-16 15:41:37 -06:00
Sachin Agarwal 923b8a13bf Improving ceph-examples-md
Adding some more context and details to the ceph examples. Updated links to Nautilus, added several links to ceph documentation, explained block/file/object storage, fixed some syntax errors.

Signed-off-by: Sachin Agarwal <sachinkagarwal@gmail.com>
2019-04-16 16:26:14 -04:00
Alexander Trost 0c6eb7aa3d crds: Set annotations pods, deployments and so on
Allow the user to set annotations in the CRDs of the following operators which will then be set on
the resulting Pods (Deployments, StatefulSets and so on).
Operators:
* Cassandra
* Ceph
* CockroachDB
* EdgeFS
* Minio
* NFS

The Annotations related structures have been added to the
rook.io/v1alpha2 pkg.

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2019-04-16 20:47:05 +02:00
Noah Watkins e97a746386 discover: trigger device probe on udev event
this patch monitors udev events from the block subsystem via the udevadm
tool. it watches for add and delete events within a specified period
(e.g. 2 seconds) and then emits a trigger which starts a new device
probe operation.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2019-04-16 11:29:09 -07:00
Noah Watkins e0c1f5af1a discover: smarter device list change calculation
this patch ignores the UUID when determining if a device probe result
has changed. it has been observed that on some machines the UUID for the
devices are not stable. the UUID is still reported as normal through the
configmap.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2019-04-16 11:28:41 -07:00
Noah Watkins 0b0f38c0f5 ceph: run orch on device disocvery configmap update
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2019-04-16 11:28:41 -07:00
Noah Watkins c25e262c75 ceph/osd: mount /run/udev for lvs speedup
When Ceph OSD spins up using ceph-volume, `ceph-volume lvm activate
--no-systemd --bluestore...` runs `lvs` which can cause significant
delays when /run/udev is not mounted from the host.

Before:

[root@rook-ceph-osd-0-858f49b5-md4t9 /]# time lvs
  WARNING: Failed to connect to lvmetad. Falling back to device scanning.
  WARNING: Device /dev/sda not initialized in udev database even after waiting 10000000 microseconds.
...
  LV                                            VG                                        Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  osd-data-729c1fb6-440f-434c-be49-f199fa59f1c0 ceph-3bf7823b-6db3-42b6-bf8f-c36301e85238 -wi-ao---- <10.00g

real    1m30.545s

After:

[root@rook-ceph-osd-0-d8c4698b8-5vqnk /]# time lvs
  WARNING: Failed to connect to lvmetad. Falling back to device scanning.
  LV                                            VG                                        Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  osd-data-6c7249cc-cbd1-4f3b-9027-03725886bb30 ceph-9808319f-8567-4930-803a-41f70e537c1f -wi-ao---- <10.00g

real    0m0.043s

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2019-04-16 11:09:13 -07:00
Noah Watkins 48e86d6bf7 ceph: skip orch on non-ready clusters
the k8s Node add/update events can fire before a cluster is fully
configured, which may leave some state undefined. skip orchestration
when the cluster is in this state.

fixes: #3001

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2019-04-16 10:39:55 -07:00
Travis Nielsen b7622d0fe5 Merge pull request #2921 from leseb/log-to-file
Log to file
2019-04-16 06:56:44 -06:00
Madhu Rajanna ca396dce6f rearrange the order of rbd resource cleanup
the cleanup should be in order such that
cloned PVC, snapshot and snapshotclass has
to be deleted.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-04-16 13:25:42 +05:30
Madhu Rajanna a43dedc792 remove common.yaml deployment from csi doc
creation of the rbac is pre-req for
rook operator deployment, so removing
it from ceph-csi operator as rook operator
is pre-req for ceph-csi.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-04-16 13:23:36 +05:30
Travis Nielsen 6af3c4bd8c Merge pull request #2942 from karmab/ocp4
set correct flexvolume dir for openshift4
2019-04-15 21:28:50 -06:00
Blaine Gardner 966aef8681 ceph mds: update keyring before deployment update
Because the deployment update-and-wait function waits for the deployment
to be ready, and that cannot happen due to the keyring not
having been updated yet. The keyring has its
owner set to the deployment so that no special keyring handling must
be done, but it must be created after the deployment UID is known.
Change the order of operations so that the existing deployment's UID can
be retrieved if it exists and the keyring created/updated before the
update-and-wait function is called.

This order-of-operations issue currently only applies to the mds. Other
daemons whose keyrings are owned by the replication controller do not
use the update-and-wait function.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-04-15 12:26:46 -06:00
Sébastien Han 4438672e47 ceph: expose ceph version to osd pod
We must expose the ceph version to the osd pod so that we can generate
the proper ceph configuration file. If we don't do this all the version
check will assume they run the opposite of the desired version and the
formatting of the `ceph.conf` will be wrong.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-04-15 15:57:23 +02:00
Sébastien Han 6b84fee2ab ceph: add a CephVersionFormatted so we can consume it
Let's return the expected pattern so that can be consumed by
ExtractCephVersion later. We don't modify the built-in String() so we
can more easily remove that once we switch the osd to be configured from
the operator.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-04-15 10:52:06 +02:00
Sébastien Han b8874d7f3f ceph: allow logging control
We now run all the daemon with a new option from Nautilus 14.2.1 which
allows us to tell to a daemon to not log on file. However, we can decide
to activate logging by editing the configuration flag 'log_to_file' via
the centralized config store like this for a particular daemon:

ceph config set mon.a log_to_file true

This is useful when a daemon keeps crashing and we want to collect log
files on the system.

Fixes: https://github.com/rook/rook/issues/2881
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-04-15 10:52:03 +02:00
Sébastien Han d4c48bb293 ceph: expose /var/log/ceph to the host
It's quite convinient to expose /var/log/ceph so that we can decide to
activate logs locally on the machine and see what's going on.
This is only a placeholder when a daemon is stuck crashlooping and we
want to allow administrator to gather log files.
We still do not log on file but this can be activated via a config
option passed to the centralized config option store.

For some daemons, which typically do not store any data (rgw, rbd-mirror
and mds) we had to propagate dataDirHostPath from the cluster spec to
each creation call so that the bindmount can happen.

Fixes: https://github.com/rook/rook/issues/2881
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-04-15 10:47:09 +02:00
Sébastien Han 4627b66636 ceph: expose clusterInfo to the osd code
When instanciating an osd, we now pass clusterInfo which basically
represents a collection of information about a particular Ceph cluster. Rook uses information
// about the cluster to configure daemons to connect to the desired cluster.

From clusterInfo, we use the CephVersion which helps us putting
conditions for our code execution.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-04-15 10:47:09 +02:00
Alexander Trost 30589000e3 Merge pull request #2976 from galexrt/clustername_param
rookflex: Use `clusterName` if available for backwards compatibility
2019-04-13 17:56:05 +02:00
Travis Nielsen b1b77d84d6 Merge pull request #2971 from SUSE/ceph-pods-add-rook-version-label
ceph: add 'rook-version' label to controllers
2019-04-12 15:44:25 -06:00
Blaine Gardner 685a8df08d ceph: add 'rook-version' label to controllers
Add a `rook-version` label to all controller resources used by Ceph:
deployments, daemonsets, and jobs. Labels are added to controller
resources only and not to the pod templates within because changing pod
templates causes updates due to the label change. The controller
resources themselves are not updated with the label addition and
therefore don't cause an unnecessary upgrade.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-04-12 13:56:31 -06:00
Travis Nielsen c6b6c859e1 Merge pull request #2842 from ajarr/fix-2841
ceph filesytem: use `fs fail` to bring down filesystem
2019-04-12 13:48:39 -06:00
Alexander Trost 85fa159038 rookflex: Use clusterName if available for backwards compatibility
This fixes issues for users trying to delete volumes and failing because
they only have `clusterNames` set on them in Rook earlier v0.8.

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2019-04-12 21:26:16 +02:00
Ramana Raja 7800d33171 ceph filesytem: use fs fail to bring down filesystem
A ceph filesystem was brought down by marking the filesystem
as down and individually failing the MDSes. From nautilus onwards,
this could be more simply and efficiently done by using
`fs fail` command. See,
https://github.com/ceph/ceph/commit/4c49f165ec1

Resolves: #2841

Signed-off-by: Ramana Raja <rraja@redhat.com>
2019-04-12 20:42:48 +05:30
Ramana Raja bd77c609d7 ceph filesystem: correct log message
Downing filesystem is incorrectly logged as removing filesystem.

Signed-off-by: Ramana Raja <rraja@redhat.com>
2019-04-12 20:42:48 +05:30
Alexander Trost 5007f9c6c7 Merge pull request #2814 from galexrt/fix_2731
Update all operators to use apps/v1
2019-04-12 15:02:58 +02:00
Alexander Trost 8bc26d9096 k8sclient: Update all operators to use apps/v1
All usages of k8s go client are now also using the versioned `AppsV1() `
call for the client.

Updated MySQL and Wordpress, and Kube Registy examples to use apps/v1
Deployments.

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2019-04-12 09:25:42 +02:00
Travis Nielsen 65c0fd878f Merge pull request #2962 from noahdesu/ceph-crypto-link
ceph: add link to ceph docs on encryption details
2019-04-11 12:34:53 -06:00
Travis Nielsen 8f3d62e56b Merge pull request #2936 from SUSE/cautious-osd-node-removal
ceph: remove osd host nodes only when certain
2019-04-11 12:34:24 -06:00
Noah Watkins 21d6c90ed7 ceph: add link to ceph docs on encryption details
fixes: #2926

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2019-04-11 10:50:22 -07:00
Blaine Gardner a80082988d ceph: remove osds only when certain
Make the Ceph operator more cautious about when it decides to remove
nodes from the Rook-Ceph cluster which are acting as osd hosts.

When `useAllNodes` is set to `true` we assume that the user wants to
have the most hands-off experience. Node removals are allowed when a
node is delted from Kubernetes and when a node has its taints/affinities
modified by the user (but not by automatic k8s modification as much as
possible).

When `useAllnodes` is set to `false` the only time a node is removed is
if it is removed from the Ceph cluster definition.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-04-11 09:41:54 -06:00
Travis Nielsen d3e681bb63 Merge pull request #2864 from SUSE/SH_#2858
prevent multiple orchestrations at the same time
2019-04-11 09:24:54 -06:00
Travis Nielsen bdbf744f08 Merge pull request #2964 from Madhu-1/fix-csi-doc
remove manual namespace creation from doc
2019-04-11 09:09:32 -06:00
Madhu Rajanna 149ace57e6 remove manual namespace creation from doc
need to remove the manual namespace creation from
the doc because it will be created as part of
common.yaml deployment.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-04-11 14:32:07 +05:30
Stefan Haas badd3bc165 ceph: Prevent multiple orchestrations at the same time. Fixes #2858
Signed-off-by: Stefan Haas <shaas@suse.com>
2019-04-11 08:57:20 +02:00
Travis Nielsen f52df1aafd Merge pull request #2934 from Madhu-1/csi-doc-update
update ceph-csi rbd snapshot document
2019-04-10 17:28:15 -06:00
Travis Nielsen 38be11936c Merge pull request #2859 from phlogistonjohn/jjm-csi-simplify-1
Simplify Ceph CSI setup
2019-04-10 17:23:41 -06:00