Helpers for writing Ceph OpenStack Charms
Go to file
James Page 68c054fc66 Misc updates for ceph-volume support
Add support for use of the new 'ceph-volume' method for
OSD block device management for Ceph >= 12.2.4 (where the
ceph-volume tool is consistently supported in Ubuntu).

This change requires that block devices be prepared in advance
of calls to ceph-volume (which does not partitioning or setup
of {PV,VG,LV}s).

Block devices are prepare with a single partition of type GPT;
The primary data device for an OSD is prepared with a single
VG and a single LV for bluestore, or two LV's for filestore.

Filestore:

  block /dev/sdb
    pv /dev/sdb1
        vg /dev/ceph-<OSD-UUID>
            lv /dev/ceph-<OSD-UUID>/osd-data-<OSD-UUID>
            lv /dev/ceph-<OSD-UUID>/osd-journal-<OSD-UUID>

Bluestore:

  block /dev/sdb
    pv /dev/sdb1
        vg /dev/ceph-<OSD-UUID>
            lv /dev/ceph-<OSD-UUID>/osd-block-<OSD-UUID>

If separate Filestore Journal or Bluestore DB and WAL devices
have been configured, appropriate {PV,VG,LV} configuration is
created on the configured block devices.

Filestore with Journal device:

  block /dev/sdb
    pv /dev/sdb1
        vg /dev/ceph-<OSD-UUID>
            lv /dev/ceph-<OSD-UUID>/osd-data-<OSD-UUID>
  block /dev/sdc
    pv /dev/sdc1
        vg /dev/ceph-journal-<UUID>
            lv /dev/ceph-journal-<UUID>/osd-journal-<OSD-UUID>

Bluestore with DB and WAL devices:

  block /dev/sdb
    pv /dev/sdb1
        vg /dev/ceph-<OSD-UUID>
            lv /dev/ceph-<OSD-UUID>/osd-block-<OSD-UUID>
  block /dev/sdc
    pv /dev/sdc1
        vg /dev/ceph-db-<UUID>
            lv /dev/ceph-db-<UUID>/osd-db-<OSD-UUID>
  block /dev/sdd
    pv /dev/sdd1
        vg /dev/ceph-wal-<UUID>
            lv /dev/ceph-wal-<UUID>/osd-wal-<OSD-UUID>

ceph-volume makes extensive use of LVM tags to encode required
Ceph information directly into the LVM volume metadata - this
can be view using 'ceph-volume lvm list'.

ceph-volume managed devices are prepared and activated using the
'create' subcommand which differs somewhat from ceph-disk, where
OSD's are activated using udev triggers.

This review also switches to using the charmhelpers zap_disk
function to clean disks prior to use by ceph; this resolves an
outstanding issue with use of Ceph lockbox encryption with
ceph-disk. ceph-volume continues to support the encrypt config
option, applying LUKS based dm-crypt encryption to the LV's
supporting an OSD, with keys stored directly in the MON cluster.

This review also drops support for behaviour in older ceph
releases which are not longer support in Ubuntu (as the author
was not prepared to write new unit test cases for code that
does not ever get run).

Change-Id: I1675b67d364ae6042129a8a717d4bdffff5bde92
2018-03-28 14:23:15 +01:00
ceph Misc updates for ceph-volume support 2018-03-28 14:23:15 +01:00
unit_tests Misc updates for ceph-volume support 2018-03-28 14:23:15 +01:00
.gitignore Add optional additional device types 2017-09-25 11:30:36 -04:00
.gitreview Add git-review configuration 2016-09-23 13:35:54 +01:00
.testr.conf Add pool support to get_named_key 2016-08-04 15:12:00 -07:00
README.md Show team and repo badges on README 2016-11-25 19:27:34 +01:00
requirements.txt Move nose to test-requirements.txt 2016-11-15 10:03:01 -05:00
setup.py Make charms.ceph fully py2/py3 compatible 2017-10-30 12:02:58 +00:00
test-requirements.txt Move nose to test-requirements.txt 2016-11-15 10:03:01 -05:00
tox.ini Make charms.ceph fully py2/py3 compatible 2017-10-30 12:02:58 +00:00

README.md

Team and repository tags

Team and repository tags

charms_ceph

Helper functions for the ceph charms. This library has shared functionality that is used in the ceph-mon, ceph-osd and ceph charms. Anything that needs to be shared across the ceph charms should live here.