Commit Graph
71 Commits
Author SHA1 Message Date
morimoto-cybozu 815927d943 clusterd: return explicit errors
PopulateDeviceInfo() in pkg/clusterd/disk.go returns nil as *sys.LocalDisk
if an error has occurred.  This causes a nil pointer exception at
getAvailableDevices() in pkg/daemon/ceph/osd/daemon.go.  At least the returned
value should be checked at the caller.
I added an explicit error to the return value of PopulateDeviceInfo().  This
naturally revokes an error check at the caller.
I modified PopulateDeviceUdevInfo() in the same file too.

Signed-off-by: morimoto-cybozu <kenji_morimoto@cybozu.co.jp>
2019-10-15 08:30:45 +00:00
rohan47andAshish Ranjan d2f52aebe5 Adds support for storageClassDeviceSet in rook-ceph operator
- Added code to support StorageClassDeviceSet spec provided in the cluster-on-pvc.yaml
- The code reads the StorageClassDeviceSet spec and creates pvc based on the ‘count’ field for each device set.
- OSD prepare job is started for each PVC which activates the ceph-volume on each PVC
- Finally OSD is started on each of the PVC device.

Co-authored-by: rohan47 <rohgupta@redhat.com>
Co-authored-by: Ashish Ranjan <aranjan@redhat.com>
Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2019-08-12 09:24:13 -06:00
Sébastien Han 928c4a01da Merge pull request #3418 from InfuseAI/feature/add-linear-type-to-supported-disks
Add linear to support diskType
2019-07-11 17:35:46 +02:00
Ash Wu e6d43d9d0b Add linear to support diskType
Linear raid can be created using `mdadm --create --level=linear`,

By creating a linear raid disk on top of a logical volume,
we can pass the linear device to `ceph-volume lvm batch --prepare`
to provision a new OSD on top of the logical volume since
`ceph-volume` does not take lv as the data device.

Signed-off-by: Ash Wu <hSATAC@gmail.com>
2019-07-10 11:14:26 +08:00
Ash Wu b0eb246919 Remove unused clusterd.GetAvailableDevices
clusterd.GetAvailableDevices is not used anywhere.

Signed-off-by: Ash Wu <hSATAC@gmail.com>
2019-07-09 17:16:37 +08:00
Guy Margalit 2ce2382676 Refactor operator context init and allow to run local
Signed-off-by: Guy Margalit <guymguym@gmail.com>
Co-Authored-By: Sébastien Han <seb@redhat.com>
Co-Authored-By: Travis Nielsen <tnielsen@redhat.com>

This change is meant to allow running operators locally on a developer machine.
The idea is to allow faster development cycles by reducing the time and complexity of building -> deploying -> debugging on cluster.

For operators that rely only on kubernetes API this works easily - see cockroachdb and minio examples in development-flow doc.

The change includes:

- rook.NewContext() - Refactored to remove repeating initialization code that was copy-pasted in most of the operators in order to create the clusterd.Context and the Clientsets. Also it detects the mode of working in-cluster vs external and sets up the external mode with standard user config (~/.kube/config) and a job executor.
- rook.GetOperatorImage() - Refactor this repeating code in many operators to detect the operator pod image. Also added a global flag --operator-image that developers can use to override this when running locally.
- rook.TerminateOnError() - Added a convenient function.
2019-06-19 20:47:55 +03:00
travisn f7c266f7ec skip sgdisk detection if not found in nautilus image
Signed-off-by: travisn <tnielsen@redhat.com>
2018-12-06 21:28:57 -07: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
Jared Watts 48b879e0ad Merge pull request #1769 from ucloudlab/ipv6-support
support ipv6
2018-06-19 20:33:12 -07:00
travisn d5d3540497 osd: detect disk uuid with sgdisk
Signed-off-by: travisn <tnielsen@redhat.com>
2018-06-19 13:05:51 -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
travisn 4078b1b7f9 osd: device discovery to load part uuid after restart
Signed-off-by: travisn <tnielsen@redhat.com>
2018-06-01 21:03:03 -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
David González Ruiz eb59858124 Recognize crypt type as avaiable type and test the feature
Signed-off-by: David González Ruiz <godboole@gmail.com>
2018-02-01 15:13:31 +01:00
David González Ruiz 093d881b9f [OSD] Add crypt type to the array of supported block devices
[skip ci]

Signed-off-by: David González Ruiz <godboole@gmail.com>
2018-01-31 17:41:22 +01:00
Travis Nielsen e2bd9276bf consume the generated rook clientset 2017-12-11 14:35:07 -08:00
Travis Nielsen 0ad60c065b osd: refactor proc manager for only the osd daemon 2017-10-26 17:57:25 -07:00
Travis Nielsen 4e6774c063 remove legacy standalone code 2017-10-17 12:23:57 -07:00
Jared Watts caa9fdf96a log version, arguments and flags at start up 2017-08-24 14:02:53 -07:00
Travis Nielsen ec181c0390 logs: stop writing the frequent health check 2017-08-07 10:58:52 -07:00
Steve Leon 709b7ddafe Using CRD instead of TPR
- Use CRD for clusters and pools
- For k8s before 1.7.0, TPR will be used
- Also use the watcher libraries in client-go
2017-07-27 16:14:52 -07:00
Bassam Tabbara cdc26ef162 enable 'gofmt -s' and fix issues 2017-07-16 21:24:13 -07:00
Travis Nielsen bde8e61734 operator: refactor kube context into the kit package 2017-06-28 12:49:59 -07:00
Travis Nielsen 059987e6cf build: unit tests pass on mac 2017-06-23 16:00:21 -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
Lorenz Brun 6752115d7f Do not try to dump partition tables of RBD devices 2017-05-01 19:46:06 +02:00
Travis Nielsen 37d85a374b cleanup the command line arguments and other PR feedback 2017-02-01 11:00:09 -08:00
Travis Nielsen fbd1a0ce91 create osd daemon set for filestore and bluestore osds 2017-02-01 09:50:02 -08:00
Travis Nielsen 4d28447239 end to end single monitor pod launched by the operator 2017-02-01 09:50:02 -08:00
Travis Nielsen 3c56abd279 factor out rgw daemon to run both in k8s and rook orchestration 2017-02-01 09:48:53 -08:00
Jared Watts 1dbc61ff6a allow public/cluster network config information to be specified to rookd 2017-01-30 21:13:05 -08:00
Jared Watts 5d3c88963b Allow OSD bluestore partitions to be separated to a dedicated high performance metadata device (e.g., NVMe/SSD) 2017-01-23 09:49:21 -08:00
Travis Nielsen 5d76276f29 detect rook partitions
(cherry picked from commit 0f5552389eba6dad8babab027a05a5466517177f)
2017-01-20 16:48:17 -08:00
Travis Nielsen becc9d4f42 pass the inventory properties by reference 2017-01-06 07:44:59 -08:00
Jared Watts 2813e6931a allow ceph config file override with --ceph-config-override (or ROOKD_CEPH_CONFIG_OVERRIDE env var) 2017-01-04 09:01:47 -08:00
Travis Nielsen ba84868a84 detect system memory during inventory 2016-12-22 11:35:24 -08:00
Travis Nielsen 6193e00653 run inventory with only basic disk info in etcd 2016-12-22 11:31:24 -08:00
Travis Nielsen ce1e3810a8 Clean up working with devices 2016-12-22 10:38:44 -08:00
Jared Watts 0e00f57758 Migrate logging package from built-in to github.com/coreos/capnslog, allow user specified logging level, tune logging levels for existing log statements 2016-11-16 14:19:42 -08:00
Travis Nielsen a44f301979 refactor cephmgr into subpackages 2016-11-10 12:43:14 -08:00
Bassam Tabbara b3c4f18c89 initial docs and licensing 2016-11-07 17:13:39 -08:00
Travis Nielsen 632f418cea execute all child processes with logging and same executor 2016-10-31 13:07:11 -07:00
Travis Nielsen af78fb0183 simplify refresh event notifications 2016-10-27 13:48:43 -07:00
Jared Watts 9b70f97fb8 Enable debug logging from the cmd line with --debug 2016-10-27 11:27:39 -07:00
Travis Nielsen 12a195ab0d usage of public and private ip addresses 2016-10-27 09:06:50 -07:00
Bassam Tabbara 7da39894c0 rename castle to rook
switched to using quay.io for all containers -- we are no longer
publishing to hub.docker.com.
2016-10-27 13:42:03 +02:00
Bassam Tabbara 4936587b94 go import fixes 2016-10-26 00:38:39 +02:00
Travis Nielsen 97b6a1d70d simplify etcd packages 2016-10-25 11:00:34 -07:00
Travis Nielsen 3772349491 remove or convert sys calls that require bash 2016-10-21 14:55:32 -07:00