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
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.