rbd volume support
Ceph 16 (Pacific) will support attaching RBD images to Windows hosts as well as Hyper-V VMs [1]. This patch updates the Hyper-V driver so that it may be able to consume RBD volumes. os-brick patch: I56bf09cbd40679eefa5e378c9b36383de89e980c [1] https://github.com/ceph/ceph/pull/33750 Implements: blueprint rbd-volumes Change-Id: I726e426a7274d7c9c6a878afddd23a20ce222a33
This commit is contained in:
parent
b31ab3a293
commit
81c7cf6c40
|
@ -32,10 +32,11 @@ class ClusterVolumeOps(volumeops.VolumeOps):
|
||||||
def _get_volume_driver(self, connection_info):
|
def _get_volume_driver(self, connection_info):
|
||||||
driver_type = connection_info.get('driver_volume_type')
|
driver_type = connection_info.get('driver_volume_type')
|
||||||
if driver_type in [constants.STORAGE_PROTOCOL_ISCSI,
|
if driver_type in [constants.STORAGE_PROTOCOL_ISCSI,
|
||||||
constants.STORAGE_PROTOCOL_FC]:
|
constants.STORAGE_PROTOCOL_FC,
|
||||||
|
constants.STORAGE_PROTOCOL_RBD]:
|
||||||
err_msg = (
|
err_msg = (
|
||||||
"The Hyper-V Cluster driver does not currently support "
|
"The Hyper-V Cluster driver does not currently support "
|
||||||
"passthrough disks (e.g. iSCSI/FC disks). The reason is "
|
"passthrough disks (e.g. iSCSI/FC/RBD disks). The reason is "
|
||||||
"that the volumes need to be available on the destination "
|
"that the volumes need to be available on the destination "
|
||||||
"host side during an unexpected instance failover. In order "
|
"host side during an unexpected instance failover. In order "
|
||||||
"to leverage your storage backend, you may either use the "
|
"to leverage your storage backend, you may either use the "
|
||||||
|
|
|
@ -100,6 +100,7 @@ IOPS_BASE_SIZE = 8 * units.Ki
|
||||||
STORAGE_PROTOCOL_ISCSI = 'iscsi'
|
STORAGE_PROTOCOL_ISCSI = 'iscsi'
|
||||||
STORAGE_PROTOCOL_FC = 'fibre_channel'
|
STORAGE_PROTOCOL_FC = 'fibre_channel'
|
||||||
STORAGE_PROTOCOL_SMBFS = 'smbfs'
|
STORAGE_PROTOCOL_SMBFS = 'smbfs'
|
||||||
|
STORAGE_PROTOCOL_RBD = 'rbd'
|
||||||
|
|
||||||
MAX_CONSOLE_LOG_FILE_SIZE = units.Mi // 2
|
MAX_CONSOLE_LOG_FILE_SIZE = units.Mi // 2
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,8 @@ class VolumeOps(object):
|
||||||
self.volume_drivers = {
|
self.volume_drivers = {
|
||||||
constants.STORAGE_PROTOCOL_SMBFS: SMBFSVolumeDriver(),
|
constants.STORAGE_PROTOCOL_SMBFS: SMBFSVolumeDriver(),
|
||||||
constants.STORAGE_PROTOCOL_ISCSI: ISCSIVolumeDriver(),
|
constants.STORAGE_PROTOCOL_ISCSI: ISCSIVolumeDriver(),
|
||||||
constants.STORAGE_PROTOCOL_FC: FCVolumeDriver()}
|
constants.STORAGE_PROTOCOL_FC: FCVolumeDriver(),
|
||||||
|
constants.STORAGE_PROTOCOL_RBD: RBDVolumeDriver()}
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def _vmops(self):
|
def _vmops(self):
|
||||||
|
@ -771,3 +772,9 @@ class SMBFSVolumeDriver(BaseVolumeDriver):
|
||||||
class FCVolumeDriver(BaseVolumeDriver):
|
class FCVolumeDriver(BaseVolumeDriver):
|
||||||
_is_block_dev = True
|
_is_block_dev = True
|
||||||
_protocol = constants.STORAGE_PROTOCOL_FC
|
_protocol = constants.STORAGE_PROTOCOL_FC
|
||||||
|
|
||||||
|
|
||||||
|
class RBDVolumeDriver(BaseVolumeDriver):
|
||||||
|
_is_block_dev = True
|
||||||
|
_protocol = constants.STORAGE_PROTOCOL_RBD
|
||||||
|
_extra_connector_args = dict(do_local_attach=True)
|
||||||
|
|
|
@ -103,8 +103,8 @@ make sure to enable the following config option:
|
||||||
|
|
||||||
This will ensure that the available paths are actually leveraged. Also, before
|
This will ensure that the available paths are actually leveraged. Also, before
|
||||||
attempting any volume connection, it will ensure that the MPIO service is
|
attempting any volume connection, it will ensure that the MPIO service is
|
||||||
enabled and that passthrough block devices (iSCSI / FC) are claimed by MPIO.
|
enabled and that iSCSI and Fibre Channel block devices are claimed by MPIO.
|
||||||
SMB backed volumes are not affected by this option.
|
SMB and RBD volumes are not affected by this option.
|
||||||
|
|
||||||
In some cases, Nova may fail to attach volumes due to transient connectivity
|
In some cases, Nova may fail to attach volumes due to transient connectivity
|
||||||
issues. The following options specify how many and how often retries should be
|
issues. The following options specify how many and how often retries should be
|
||||||
|
|
|
@ -99,6 +99,7 @@ following protocols:
|
||||||
* iSCSI
|
* iSCSI
|
||||||
* Fibre Channel
|
* Fibre Channel
|
||||||
* SMB - the volumes are stored as virtual disk images (e.g. VHD / VHDX)
|
* SMB - the volumes are stored as virtual disk images (e.g. VHD / VHDX)
|
||||||
|
* RBD - starting with Ceph 16 (Pacific)
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The standard Hyper-V Nova driver can now attach RBD volumes. Note that the
|
||||||
|
cluster driver doesn't support RBD volumes yet. The minimum required
|
||||||
|
Ceph version is Ceph 16 (Pacific).
|
Loading…
Reference in New Issue