Deprecate sparse LVs
That feature was never tested in Nova and we had some bugs. Deprecating it. Change-Id: I6f05bb32313de1d832fe080c00a74508224acd77
This commit is contained in:
@@ -665,6 +665,13 @@ Related options:
|
|||||||
"""),
|
"""),
|
||||||
cfg.BoolOpt('sparse_logical_volumes',
|
cfg.BoolOpt('sparse_logical_volumes',
|
||||||
default=False,
|
default=False,
|
||||||
|
deprecated_for_removal=True,
|
||||||
|
deprecated_since='18.0.0',
|
||||||
|
deprecated_reason="""
|
||||||
|
Sparse logical volumes is a feature that is not tested hence not supported.
|
||||||
|
LVM logical volumes are preallocated by default. If you want thin provisioning,
|
||||||
|
use Cinder thin-provisioned volumes.
|
||||||
|
""",
|
||||||
help="""
|
help="""
|
||||||
Create sparse logical volumes (with virtualsize) if this flag is set to True.
|
Create sparse logical volumes (with virtualsize) if this flag is set to True.
|
||||||
"""),
|
"""),
|
||||||
|
@@ -685,8 +685,8 @@ class Lvm(Image):
|
|||||||
|
|
||||||
super(Lvm, self).__init__(path, "block", "raw", is_block_dev=True)
|
super(Lvm, self).__init__(path, "block", "raw", is_block_dev=True)
|
||||||
|
|
||||||
# TODO(pbrady): possibly deprecate libvirt.sparse_logical_volumes
|
# TODO(sbauza): Remove the config option usage and default the
|
||||||
# for the more general preallocate_images
|
# LVM logical volume creation to preallocate the full size only.
|
||||||
self.sparse = CONF.libvirt.sparse_logical_volumes
|
self.sparse = CONF.libvirt.sparse_logical_volumes
|
||||||
self.preallocate = not self.sparse
|
self.preallocate = not self.sparse
|
||||||
|
|
||||||
|
@@ -35,6 +35,7 @@ CONF = nova.conf.CONF
|
|||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
# TODO(sbauza): Remove the possibility to ask for a sparse LV.
|
||||||
def create_volume(vg, lv, size, sparse=False):
|
def create_volume(vg, lv, size, sparse=False):
|
||||||
"""Create LVM image.
|
"""Create LVM image.
|
||||||
|
|
||||||
|
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- |
|
||||||
|
The ``[libvirt]/sparse_logical_volumes`` configuration option is now
|
||||||
|
deprecated. Sparse logical volumes were never verified by tests in Nova
|
||||||
|
and some bugs were found without having fixes so we prefer to deprecate
|
||||||
|
that feature.
|
||||||
|
By default, the LVM image backend allocates all the disk size to a logical
|
||||||
|
volume. If you want to have the volume group having thin-provisioned
|
||||||
|
logical volumes, use Cinder with volume-backed instances.
|
Reference in New Issue
Block a user