Commit Graph
224 Commits
Author SHA1 Message Date
Yannis Zarkadas a9178ccb59 cassandra: sidecar-side implementation of scale down
The sidecar now has a control loop, which watches its ClusterIP
Service for the `cassandra.rook.io/decommissioned` label.
If it finds it, then it decommissions and updates the label to
value "true".

Signed-off-by: Yannis Zarkadas <yanniszarkadas@gmail.com>
2018-12-07 13:46:46 +02:00
Yannis Zarkadas f5a41e9a7c cassandra: controller-side implementation of scale down
Code handling the scale down on the side of the controller.
Also, some new util functions.

Signed-off-by: Yannis Zarkadas <yanniszarkadas@gmail.com>
2018-12-07 13:46:45 +02:00
Dmitry Yusupov 63c30a03ec Edgefs CMDs
Signed-off-by: Dmitry Yusupov <dmitry.yusupov@nexenta.com>
2018-12-05 23:05:42 -08:00
travisn a29b876337 rename ceph v1 crds with the ceph prefix
Signed-off-by: travisn <tnielsen@redhat.com>
2018-12-05 16:23:55 -07:00
Yannis Zarkadas 367d485407 cassandra: sidecar implementation
Implementation of the cassandra sidecar logic.
This sidecar helps us inject our custom values during startup
and provides HTTP liveness and readiness checks.
In the future it will also be used for:
- Shutting Down / Decommissioning a cassandra instance
- Backups
- Restores

Signed-off-by: Yannis Zarkadas <yanniszarkadas@gmail.com>
2018-12-05 12:47:26 +02:00
Yannis Zarkadas 0ccc04cccd cassandra: controller scaffolding, image build and manifests
Scaffolding of a Kubernetes controller using the informer-workqueue
pattern.
Dockerfiles and Makefiles to build the cassandra operator image.
Manifests to deploy the Cassandra operator and create a Cluster CRD.

Signed-off-by: Yannis Zarkadas <yanniszarkadas@gmail.com>
2018-12-05 12:44:29 +02:00
Alexander Trost ac19f85fbb Allow specifying custom Ceph user and secret name for mounting
Introduce mount security mode for basic multi tenancy

Fixes #2164.

This adds three new parameters/options to StorageClass/flexvolume entry:
* `mountUser`
* `mountSecret`
* `mountSecretNamespace`

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2018-12-04 20:17:15 +01:00
Travis Nielsen 9654e51db1 Merge pull request #2290 from travisn/rbd-mirror
Enable rbd mirror daemon in the cluster crd
2018-11-30 08:54:40 -07:00
Blaine Gardner 9ae6dfcd25 Ceph osd: terminate fatal on pod init failures
Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2018-11-28 14:56:03 -07:00
travisn fdd64bb95a enable rbd mirror daemon in the cluster crd
Signed-off-by: travisn <tnielsen@redhat.com>
2018-11-28 08:29:57 -07:00
Travis Nielsen b255d8fb75 Merge pull request #2219 from anguslees/norelabel
Disable SELinux relabelling
2018-11-13 23:32:56 -07:00
travisn 94a7a0d4bc run daemons with the ceph image instead of rook
Signed-off-by: travisn <tnielsen@redhat.com>
2018-11-01 11:49:35 -06:00
travisn 01dc5656f3 reduce frequency of device discovery
Signed-off-by: travisn <tnielsen@redhat.com>
2018-10-17 09:56:47 -06:00
Angus Lees 72278a7e15 Disable seLinux relabelling
seLinux relabelling breaks (times out) on large filesystems, and
doesn't work with cephfs ReadWriteMany volumes (last relabel wins).

See also https://github.com/kubernetes/kubernetes/blob/02cca1f11a8ae570369540564604d0cde06e0720/pkg/volume/cephfs/cephfs.go#L209

Fixes #2177

Signed-off-by: Angus Lees <gus@inodes.org>
2018-10-15 21:40:56 +11:00
travisn b43f0056ed rgw: generate config in init container
Signed-off-by: travisn <tnielsen@redhat.com>
2018-10-09 21:43:24 -06:00
Travis Nielsen 7de9624e91 Merge pull request #2153 from SUSE/ceph-mds-use-init-container
Ceph mds/file: Set up config in init container
2018-10-08 11:24:14 -06:00
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
Huamin Chen 97d20f9833 don't print console logs during flex driver call
Signed-off-by: Huamin Chen <hchen@redhat.com>
2018-10-03 08:46:28 -04:00
Travis Nielsen 6f63d16e69 Merge pull request #2146 from travisn/osd-run-with-daemon-image
Enable filestore on device scenario to run with ceph image
2018-09-26 13:19:08 -06:00
Travis Nielsen 19da8856f0 Merge pull request #2159 from rootfs/no-logging
Revert "log the output of blkid to see if device should be formatted"
2018-09-26 11:03:10 -06:00
travisn 15f6ee5b14 osd: enable filestore on device scenario to run with ceph image
update osd specs to be consistent with other daemons

Signed-off-by: travisn <tnielsen@redhat.com>
2018-09-26 10:36:16 -06:00
Huamin Chen 3832708c4f Revert "log the output of blkid to see if device should be formatted"
This reverts commit c67542829b.

Signed-off-by: Huamin Chen <hchen@redhat.com>
2018-09-26 12:42:49 +00:00
Ganesh Maharaj Mahalingam 30dcd26da9 Enable glog logging
Change enables glog logging and also make default flag values
configurable.

Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2018-09-24 13:17:25 -07: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
Travis Nielsen 5d735cfc07 Merge pull request #2113 from travisn/log-format-status
Log the output of blkid to see if device should be formatted
2018-09-17 20:36:32 -06:00
travisn c67542829b log the output of blkid to see if device should be formatted
Signed-off-by: travisn <tnielsen@redhat.com>
2018-09-14 08:27:02 -06:00
Blaine Gardner 655692e845 Ceph mon: Set up config in init containers
Progress toward issue #2003.
Includes design from design doc PR #1578

Use init containers to create configuration for Ceph mons. There are 3
init containers in this design:
 1. Using the Rook image, call the Rook binary to create Ceph config
files ultimately stored in a k8s EmptyDir which is shared between all
containers in a mon pod.
 2. Leaving room to use the Ceph-versioned image in the future, call
`monmaptool` to generate the monmap, stored in a shared config dir.
 3. Leaving room to use the Ceph-versioned image in the future, call
`ceph-mon --mkfs ...` to set up the mon filesystem on the host's disk.

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

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2018-09-12 17:56:08 -06:00
Blaine Gardner 4be911c5b1 Ceph: include daemons as <dmn>daemon
To help with code readability, include daemons from `pkg/daemon/ceph`
as `<dmn>daemon "github.com/rook/rook/pkg/daemon/ceph/<dmn>`. This will
make it easier to understand code lines without needing to scroll up to
check the includes, as there are mon/mds/mgr/osd/rgw packages for
daemons as well as operator and cmd.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2018-09-06 09:40:00 -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
Dennis Chen 3f46c44ee8 Correct the rookflex usage information
As the `rookflex` volume plugin, the root command should be
`rookflex` instead of `rook`, else we'll get below confusing
message:

```
...bin/#./rookflex help
Rook Flex volume plugin

Usage:
  rook [command]

Available Commands:
  help        Help about any command
  init        Initialize the volume plugin
  mount       Mounts the volume to the pod volume
  unmount     Unmounts the pod volume
```

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2018-08-23 16:24:00 +08:00
rohan47 41ab581b76 nfs: operator/controller implementation
Signed-off-by: rohan47 <rohanrgupta1996@gmail.com>
2018-08-22 10:34:40 +00:00
travisn 1d928ecd36 osd: init container to initialize config at startup
Signed-off-by: travisn <tnielsen@redhat.com>
2018-07-31 14:39:53 -06:00
travisn f1ad88e0ac tests: enable osds on devices
Signed-off-by: travisn <tnielsen@redhat.com>
2018-07-05 16:09:20 -06:00
travisn 021e8e7a9e osd: watch provisioning status for all nodes and start osds as each node is ready
Signed-off-by: travisn <tnielsen@redhat.com>
2018-07-05 16:08:31 -06:00
travisn 330aa9b6c8 osd: cleanup mounts for filestore on a device and other refactor for one osd per pod
Signed-off-by: travisn <tnielsen@redhat.com>
2018-07-05 16:04:03 -06:00
Huamin Chen 82425aafcc prepare osd in a job per node. Once all osds are prepared, store osd info in orchestration configmap.
Operator watches the configmap, starts one osd replica set per osd.

Signed-off-by: Huamin Chen <hchen@redhat.com>
2018-07-05 16:02:27 -06:00
Alexander Trost 6fb6c212c6 Don't set default for IP flags
Fixes the issue that when the old IPv4 flags were set, the new flags
were still used because of the default being the new flags not being
empty.

Added `NetworkInfo()` func to cmd/ceph to get simplified network info

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2018-06-27 17:20:25 +02:00
travisn 6502cda3b4 refactor cluster roles for minimal rbac access
Signed-off-by: travisn <tnielsen@redhat.com>
2018-06-25 12:57:25 -06:00
Jared Watts 819929070a Merge pull request #1756 from tonya11en/minio_implementation
Implement Minio deployment/teardown
2018-06-22 09:38:30 -07:00
Tony Allen 7442f8713b Implement Minio operator w/ tests.
Signed-off-by: Tony Allen <tony@upbound.io>
2018-06-21 16:41:30 -07:00
Jared Watts 48b879e0ad Merge pull request #1769 from ucloudlab/ipv6-support
support ipv6
2018-06-19 20:33:12 -07:00
Jared Watts f302754c9d cockroachdb: operator/controller implementation
Signed-off-by: Jared Watts <jbw976@gmail.com>
2018-06-18 19:19:15 -07:00
travisn ce0c705768 mds: daemon name is the full pod suffix
Signed-off-by: travisn <tnielsen@redhat.com>
2018-06-15 10:58:16 -07:00
Zhang Miaolei 100e80250f support ipv6 host-port pair
deprecate NetworkInfo.PublicAddrIPv4, use NetworkInfo.PublicAddr instead
deprecate NetworkInfo.ClusterAddrIPv4, use NetworkInfo.ClusterAddr instead
deprecate command flag public-ipv4, use public-ip instead
deprecate command flag private-ipv4, use private-ip instead
change ROOK_PUBLIC_IPV4 to ROOK_PUBLIC_IP
change ROOK_PRIVATE_IPV4 to ROOK_PRIVATE_IP

Signed-off-by: Zhang Miaolei <zmlcc@outlook.com>
2018-06-15 14:26:42 +08:00
Jared Watts e48e951d1c Rename toolbox to make it Ceph specific, short names for CRDs, upgrade guide tweaks
Signed-off-by: Jared Watts <jbw976@gmail.com>
2018-05-22 12:31:38 -07:00
Jared Watts f3df68e573 operator, daemon, and cmd updates for supporting multiple storage types
Signed-off-by: Jared Watts <jbw976@gmail.com>
2018-05-18 14:32:20 -07:00
travisn 7bd850e7fc flex: base driver name on the namespace
Signed-off-by: travisn <tnielsen@redhat.com>
2018-05-11 14:02:16 -07:00
Huamin Chen 6c11ff52d4 add device discovery daemon to operator:
run "rook discover" on storage nodes and discover devices on each node. The discovered disks are saved in a per node configmap, local-device-nodename.
Device information consits of name and persistent names, uuid, partition, filesystem, rotational, readonly, size, etc.

Signed-off-by: Huamin Chen <hchen@redhat.com>
2018-05-07 17:49:02 +00:00
rohan47 c80decbba8 updated storage class parameter clusterName to clusterNamespace
cluster name and namespace are required to match.
clusterName still works for backward compatiblity

Signed-off-by: rohan47 <rohanrgupta1996@gmail.com>
2018-04-25 18:24:13 +00:00