Commit Graph
16 Commits
Author SHA1 Message Date
Blaine Gardner ce803fbf9d Ceph mds/file: Set up config in init container
Progress toward issue #2003.
Includes design from design doc PR #1578

Use init containers to create configuration for Ceph mgrs. There is only
one init container in this design. The init container calls the Rook
binary to create Ceph config files which are then shared with the mds
daemon main container.

Once this init is run, the main mds daemon is run. Leaving room to use
the Ceph-versioned image in the future, call `ceph-mds --foreground ...`
to run the Ceph mds.

The refactor to using an init container also necessitated refactoring
the mdses replicaset implementation to a deployment-per-pod
implementation due to a chicken-egg problem. With a single container (in
the before times) the Rook binary was able to call the ceph-mds daemon
with an id generated from the pod name. Since the pod name is not known
before runtime, and the id is one of the few params that must be
specified to Ceph daemons on run, it is necessary to know the id
beforehand; thus the move to a deployment architecture following the
likes of the mon and mgr daemons.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2018-10-05 19:01:12 -06:00
Blaine Gardner ca71b7a311 Ceph mgr: Set up config in init container
Progress toward issue #2003.
Includes design from design doc PR #1578

Use init containers to create configuration for Ceph mgrs. There is only
1 init container in this design:
 1. Using the Rook image, call the Rook binary to create Ceph config
files shared with the mgr daemgr container.

Once this init is run, the main mgr daemgr is run. Leaving room to use
the Ceph-versioned image in the future, call `ceph-mgr --foreground ...`
to run the Ceph mgr.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2018-09-21 13:11:08 -06:00
Blaine Gardner 7a5fe8498c Ceph op: Add test package, container tests
Add a 'test' package to the Ceph operator and define a test to verify
that containers produced by Rook-Ceph match what is expected. Because
this is for 'containers' and not strictly for 'ceph containers', this
could be moved a level up to the operator test package; however, if
other backends wish to use the container tests, they will likely need to
make modifications, and there is concern that this might make the Ceph
tests brittle.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2018-09-21 09:58:32 -06:00
Blaine Gardner 78c2cec1ad Add k8s volume/mount tests to operator test pkg
Add functions for helping test Kubernetes volumes and volume mounts.

- Create functions for testing the existence of volumes/mounts by
name in a list of vols/mounts without needing to know the index of
the vol/mount in the list.

- Create functions for printing vols/mounts in a human-readable format
so that tests may output more useful errors.

- Create a test definition for ensuring that all the volumes a pod
provides and all the mounts from each pod container match. For each
volume, there must be at least one container which mounts the volume,
and for each mount, there must be a source volume.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2018-09-21 09:58:31 -06:00
Blaine Gardner 3731f06176 Ceph: Refactor mon config/keyring to cephconfig
Create a cephconfig module in Ceph's daemon pkg source, and refactor the
config and keyring generation that exists in the mon package into the
new cephconfig package. The config/keyring generation code is used by
most all daemons and not just mon, so a new package is a more
appropriate place for this.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2018-09-05 10:17:11 -06:00
travisn 5f01178e83 mon: set names based on chars instead of integers
Signed-off-by: travisn <tnielsen@redhat.com>
2018-08-30 22:18:53 -06:00
Alexander Trost 86568cafd3 operator/ceph/mon: Cleaned up tests
To make it more applicable to what is actually running when using the
operator the used test mon names have been replaced by the actual format
used in normal operations: `rook-ceph-mon[0-9]` instead of `mon[0-9]`.

This also removes some duplicated test code and used the already
available function for it.

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2018-06-04 23:01:29 +02:00
Travis Nielsen 8725170077 operator: mon affinity to nodes based on node hostname 2018-01-17 14:47:22 -08:00
Travis Nielsen 0298d1fb29 completed conversion for k8s 1.8 client conversion
move core rados packages under cluster folder

move daemons under daemon pkg

rename flex crd package to attachment

pin dep to k8s 1.8.2
2017-12-11 14:35:07 -08:00
Travis Nielsen 4e6774c063 remove legacy standalone code 2017-10-17 12:23:57 -07:00
Alexander Trost 4f4f727bcd Added hostNetwork option to cluster spec 2017-09-18 19:57:20 +02:00
Travis Nielsen f3640887f3 golint cleanup for the operator 2017-07-24 17:24:24 -07:00
Steve Leon 668ed5d25b Incorporating new Kubernetes API changes
- This is needed to make it compatible with k8s 1.8
2017-07-13 11:08:07 -07:00
Travis Nielsen c122562a7d Rook refactor to call external ceph tools instead of embedded ceph
Remove all cgo from the code base, and start the transformation to calling external ceph tools to generate config and start daemons.
2017-06-20 20:57:45 -07:00
Travis Nielsen 4710b63e65 mons are a replicaset instead of started directly as a pod 2017-06-05 15:14:10 -07:00
Travis Nielsen e0e829ed25 Rook operator unit tests 2017-03-09 15:24:33 -08:00