Commit Graph
453 Commits
Author SHA1 Message Date
Blaine Gardner 079cdb56ea ceph file: tidy up file/mds operator code
Separate `file` operator from `mds` tasks logically for easier code
navigation.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-03-06 11:32:58 -07:00
travisn 31848e23e7 add the CONTAINER_IMAGE env var to the ceph daemon pods
The mgr orchestrator modules need the container image to run
the ceph image for blinking the lights when a disk is down

Signed-off-by: travisn <tnielsen@redhat.com>
2019-03-04 13:33:41 -07:00
Travis Nielsen a145f4dcb7 Merge pull request #2703 from travisn/osds-per-device-with-filter
Clean up provisioning of OSDs on devices
2019-03-04 07:58:56 -07:00
Travis Nielsen 816d698655 Merge pull request #2742 from noahdesu/dmcrypt
ceph: share host ipc namespace with provision pod
2019-03-01 13:21:05 -07:00
Noah Watkins 6597531ed0 ceph: share host ipc namespace with provision pod
this is needed as cryptsetup in the pod and udev on the host coordinate
via a semaphore that must be visible in both contexts.

note that additionally the host needs to have dmcrypt compiled with udev
synchronization, which at least one minikube version does not have.

fixes: #923

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2019-03-01 10:50:19 -08:00
Travis Nielsen eaf6b97b59 Merge pull request #2702 from SUSE/mds-all-in-operator
ceph mds: configure completely from operator
2019-03-01 06:59:15 -07:00
Blaine Gardner 4eb4fb7aa6 ceph mds: configure completely from operator
Configure the Ceph mds daemon completely from the operator a la the
recent changes to the Ceph mon and mgr operators.

Create the mds deployments first and then
create the keyring secrets for them with their owner reference as the
corresponding deployment. This will mean that the secrets do not need to
be micromanaged. When the deployment is deleted, the secret is also
deleted. This has not been necessary for the mons or the manager since
the mons share a keyring with a lifespan of the cluster, as does the
mgr, which currently has single-mgr support only.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-02-28 12:31:43 -07:00
Jeff Layton c0910dab2c ceph: retry "ceph orchestrator set backend rook" if command returns EINVAL
Use similar method as that used by the dashboard initialization code.

Fixes: https://github.com/rook/rook/issues/2617
Signed-off-by: Jeff Layton <jlayton@redhat.com>
2019-02-27 10:55:24 -05:00
Jeff Layton 56abc00b78 ceph: fix invalidArgErrorCode definition
We should probably not hardcode this value here, and instead use
whatever the syscall module thinks this is.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
2019-02-27 10:53:10 -05:00
travisn bdc3cf8146 osd: fix the device filter and improve device provisioning reliability
All devices detected by the discovery pod were being passed to the OSD provisioning pod
thus not always honoring the desired device list that should be provisioned.
Now the provisioning pod will be given the desired state from the crd,
then apply that state depending on the actual devices detected.
Also added a helper to ensure OSDsPerDevice is always valid.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-02-26 16:11:25 -07:00
Alexander Trost 818bf38b0c Merge pull request #2685 from dyusupov/master
EdgeFS: support for S3 buckets as DNS subdomain style
2019-02-23 23:21:06 +01:00
Sébastien Han eb3c424d57 Ceph messengers 2 support
This commit introduces the necessary changes to support the new
messenger feature coming with Ceph Nautilus (currently in development).

What changes? Now the monitor listens on two port:

* old 6789 for messenger v1, which will help us support older client
(e,g: krbd)
* new 3300 for messengers v2, which brings new improvement in the
messaging layer. This new transport layer brings numerous advantages
such as encryption improvement, speed improvement, pluggable nature to
support different network stack than TCP and many more.

We still have one Service IP, however it has 2 ports, see:

```
NAME                      TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)             AGE
rook-ceph-mon-a           ClusterIP   10.106.217.160   <none>        3300/TCP,6789/TCP   4h
rook-ceph-mon-b           ClusterIP   10.99.36.175     <none>        3300/TCP,6789/TCP   4h
rook-ceph-mon-c           ClusterIP   10.108.220.74    <none>        3300/TCP,6789/TCP   4h
````

The `ceph.conf` has changed and we don't force the port when using an IP
address (public addr etc). Ceph, depending on its version will naturally
start the monitors on their right port, 6789.

A new --ceph-version-name CLI argument has been added to the Rook binary
so that when the pod starts it passes the ceph version name and the
configuration of the ceph.conf, as well as daemon startup flags, happen
properly.

Given that the Rook Operator remembers the port of all the monitors it
deployed (through Pod definition), this change is not an issue and will
maintain backward compatibility.

Note that to test this you must build rook with dev container image,
which contains the dev Nautilus version. So you should do something
like:

`make -j4 BASEIMAGE='ceph/daemon-base:latest-master' IMAGES='ceph' build`

Resolves: #2525
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-02-22 00:09:37 +01:00
Dmitry Yusupov a30966b6e4 EdgeFS: support for S3 buckets as DNS subdomain style
Signed-off-by: Dmitry Yusupov <dmitry.yusupov@nexenta.com>
2019-02-21 09:00:42 -08:00
Bogdan Luca b60897b034 Fix typo
Signed-off-by: Bogdan Luca <luca.bogdan@gmail.com>
2019-02-20 20:10:01 +02:00
Travis Nielsen 0207f95066 Merge pull request #2652 from jtlayton/wip-nfs-scale
nfs: scale up/down ganesha servers with Active count
2019-02-18 16:34:22 -07:00
travisn ecf8d890c1 convert remaining extensions to apps api
Signed-off-by: travisn <tnielsen@redhat.com>
2019-02-14 16:48:12 -07:00
Travis Nielsen 913f0e0e65 Merge pull request #2611 from rootfs/apps-api
Use Apps api over extensions
2019-02-14 16:25:33 -07:00
Huamin Chen 1b21e42a90 convert extensions to apps
Signed-off-by: Huamin Chen <hchen@redhat.com>
2019-02-14 16:06:05 -05:00
Yannis Zarkadas 7cc217137d cassandra: fix wrong mount point
Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com>
2019-02-14 16:26:51 +02:00
Dmitry Yusupov f4bfee8165 support for EdgeFS ISGW link CRD
Signed-off-by: Dmitry Yusupov <dmitry.yusupov@nexenta.com>
2019-02-13 22:29:27 -08:00
Jeff Layton c21aa227cf nfs: scale up/down ganesha servers with Active count
Rename createCephNFS to upCephNFS and have it take a parameter with the
old active count. Rename deleteGanesha to downCephNFS and have it take a
parameter with the new desired active count. Both the existing callers
pass in "0" for the new count parameters.

Fix up the onUpdate handler for CephNFS objects, such that changes to
the active count are reflected in the number of active servers. Have it
pass in the appropriate values when scaling servers up or down.

Finally, fix downCephNFS to shut down the highest-index servers first
and count down, instead of doing them in the order they were started.
This should eventually allow us more predictable behavior when scaling
down the number of server nodes.

Resolves: https://github.com/rook/rook/issues/2644
Signed-off-by: Jeff Layton <jlayton@redhat.com>
2019-02-13 16:49:48 -05:00
Travis Nielsen a5aadf0701 Merge pull request #2580 from rootfs/csi-driver
Deploy ceph-csi driver
2019-02-13 08:31:13 -07:00
Huamin Chen 3806baffe1 add ceph csi deploy options
Signed-off-by: Huamin Chen <hchen@redhat.com>
2019-02-12 21:20:41 -05:00
Travis Nielsen df73f142bf Merge pull request #2615 from jtlayton/wip-watch-url
nfs: add watch_urls directive to watch a RADOS object for notifications
2019-02-12 09:35:50 -07:00
Travis Nielsen 8420538e5f Merge pull request #2629 from SUSE/mgr-all-in-operator
Ceph mgr: configure completely from operator
2019-02-12 08:47:48 -07:00
travisn b72c6436ef handle ceph mon failover more gracefully
Signed-off-by: travisn <tnielsen@redhat.com>
2019-02-11 17:35:28 -07:00
Blaine Gardner 03ea5f0a7c ceph mgr: configure completely from operator
Configure the Ceph mgr daemon completely from the operator a la the
recent changes to the Ceph mon operator.

The pod spec for the mgr changed quite a bit, and instead of updating
the unit tests of questionable use, some additional unit test tools
applicable to any Ceph daemon have been added and used with the mgr. The
mgrs unit tests should now be more useful and get in the way of devs
less, and they can be used by other daemons later.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-02-11 14:35:01 -07:00
Travis Nielsen 8a2001c3d7 Merge pull request #2522 from travisn/reference-k8s-provisioner
Reference the k8s provisioner instead of the outdated in-tree provisioner
2019-02-07 19:39:32 -07:00
travisn 3a64288356 avoid a duplicate volume for a directory and dataDirHostPath
Signed-off-by: travisn <tnielsen@redhat.com>
2019-02-05 22:26:50 -07:00
Blaine Gardner ec416cdd92 ceph mons: set up entirely in operator
Make the Rook config-init unnecessary for mons, and remove that init
container. Perform all mon configuration steps in the operator, and set
up the mon pods and k8s environment such that only Ceph containers are
needed for running mons.

This should help streamline changes to the mons, as there will be no
need to change the `daemon/mon` code or `cmd/rook/ceph` code with mon
changes in the future.

This work starts to lay the groundwork for supporting the
`design/ceph-config-updates.md` design.

Notable new bits:

Create a keyring secret store helper for storing dameon keyrings, and
use it to store the mon keyring. Mon pods mount the keyring into a
k8s secret-backed volume.

Create a configmap store for the Ceph config file which can be mounted
into pods/containers directly to /etc/ceph/ceph.conf. Also store
individual mon_host and mon_initial_members values which can be mapped
into pods as environment variables and used in Ceph commandline flags,
enabling the mon pods to have the most up-to-date information about the
mon cluster when restarting and without need for operator intervention.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-02-05 06:19:59 -07:00
Blaine Gardner 918fffcc71 ceph mon op: split large files for readability
The mon operator code is fairly substantial. Separate large files into
more smaller ones with a good separation of names. This will be
important for trying to move all the mon code into the operator.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-02-05 06:18:00 -07:00
Blaine Gardner e13956c0bf ceph mon: set public-bind-addr from commandline
Set each Ceph mon's `public bind addr` from the commandline instead of
by inserting it into the config file. This eliminates an extra step from
initializing mon configs.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-02-05 06:06:35 -07:00
Jeff Layton 90085d89cf nfs: add watch_urls directive to watch a RADOS object for notifications
Ganesha recently grew the ability to watch a RADOS object for
notifications, which will cue it to reload its configuration. Add the
directive to the RADOS_URLS config block.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
2019-02-05 06:54:03 -05:00
Sébastien Han 712af5de11 ceph: check num mon for hostnetworking
We now refuse to start more than one monitor on the same machine if
hostnetworking is enabled.
Supporting this creates a lot more complexity from the rook side. Also
having 3 monitors running on the same machine is not a production setup.

This means multi-cluster support on the same machine
is not possible anymore when hostnetworking is enabled.

Resolves: https://github.com/rook/rook/issues/2604
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-02-04 09:52:35 +01:00
Travis Nielsen e61ab0dfd7 Merge pull request #2585 from SUSE/do-not-create-default-osd
ceph: no longer create fallback osd
2019-02-01 14:22:15 -07:00
Blaine Gardner 78d4719125 ceph: no longer create fallback osd
Rook's behavior should not be to create a default OSD in dataDirHostPath
when no devices are present on a node. Any preexisting fallback osd
should be kept as long as no dirs or disks have been specified to keep
the legacy behavior for those clusters running with these osds in place.
The legacy deletion behavior is also kept, removing the osd as soon as
any dir or device is specified other than the dataDirHostPath dir.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2019-02-01 09:41:32 -07:00
Alexander Trost 97c5cd7845 Merge pull request #2583 from sabbot/master
EdgeFS dynamic HDD/SSD detection logic fix
2019-01-29 15:50:32 +01:00
Dmitry Yusupov 7831c2775a support for EdgeFS UI
Signed-off-by: Dmitry Yusupov <dmitry.yusupov@nexenta.com>
2019-01-28 20:11:06 -08:00
Anton Skriptsov 4679695cee EdgeFS dynamic HDD/SSD detection logic fix
Signed-off-by: Anton Skriptsov <anton.skriptsov@nexenta.com>
2019-01-28 12:27:07 -08:00
Alexander Trost 8e263cd9c3 Merge pull request #2577 from leseb/rm-monmap
mon: do not generate nor inject a monmap
2019-01-28 19:14:01 +01:00
Sébastien Han ff2bc6509f mon: do not generate nor inject a monmap
Given that we have mon_host and mon_initial_members sections in our
ceph.conf, building a monitor map is not needed. During the monitor mkfs
a monmap will get generated on the fly based on the section mentioned
above.

One benefit from that commit is a potential speed improvement as we have
removed the container that was generating the map from the monitor
initialization sequence.

Resolves: https://github.com/rook/rook/issues/2576
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-01-28 16:55:31 +01:00
Sébastien Han 49363ccbbd operator: ceph - utils fix endpoint comment
The Endpoint has a format such as ip:port and the comment was implying
something like hostname:port. Thus fixing the comment with the right
value.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-01-28 10:53:10 +01:00
travisn bd25630d91 allow disabling of fsGroup in the flex driver
Signed-off-by: travisn <tnielsen@redhat.com>
2019-01-24 07:53:44 -07:00
Alexander Trost f4c394c889 Merge pull request #2518 from dyusupov/master
added support for edgefs-monitoring via Prometheus
2019-01-23 08:38:25 +01:00
Travis Nielsen 42582b8669 Merge pull request #2516 from travisn/mon-port-6789
Use the default mon port of 6789 instead of 6790
2019-01-21 11:16:11 -07:00
Dmitry Yusupov cae7e9a994 added support for edgefs-monitoring via Prometheus
Signed-off-by: Dmitry Yusupov <dmitry.yusupov@nexenta.com>
2019-01-20 19:02:17 -08:00
travisn 9afbe36ae6 set mgr privs for access to the rbd mirroring settings
Signed-off-by: travisn <tnielsen@redhat.com>
2019-01-19 21:29:19 -07:00
travisn c9d3d1bf17 reference the k8s pvc provisioner and remove outdated in-tree provisioner
Signed-off-by: travisn <tnielsen@redhat.com>
2019-01-19 07:48:00 -07:00
travisn c2f354680e mons: use the default port of 6789 instead of 6790
Signed-off-by: travisn <tnielsen@redhat.com>
2019-01-17 14:37:58 -07:00
Madhu Rajanna 6349ce8e0d cassandra,edgefs: Fix misspelled words
This PR fixes the misspelled words in comment
and struct fields.

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2019-01-17 15:40:05 +05:30