Merge "Enable 'data' LVM group only for Docker devicemapper"

This commit is contained in:
Zuul 2020-06-05 15:22:36 +00:00 committed by Gerrit Code Review
commit df3fd89fc5
6 changed files with 69 additions and 13 deletions

View File

@ -76,13 +76,19 @@ compute_lvm_groups: "{{ compute_lvm_groups_default + compute_lvm_groups_extra }}
# Default list of compute volume groups. See mrlesmithjr.manage-lvm role for
# format.
compute_lvm_groups_default:
- "{{ compute_lvm_group_data }}"
compute_lvm_groups_default: "{{ [compute_lvm_group_data] if compute_lvm_group_data_enabled | bool else [] }}"
# Additional list of compute volume groups. See mrlesmithjr.manage-lvm role
# for format.
compute_lvm_groups_extra: []
# Whether a 'data' LVM volume group should exist on compute hosts. By default
# this contains a 'docker-volumes' logical volume for Docker volume storage. It
# will also be used for Docker container and image storage if
# 'docker_storage_driver' is set to 'devicemapper'. Default is true if
# 'docker_storage_driver' is set to 'devicemapper', or false otherwise.
compute_lvm_group_data_enabled: "{{ docker_storage_driver == 'devicemapper' }}"
# Compute LVM volume group for data. See mrlesmithjr.manage-lvm role for
# format.
compute_lvm_group_data:

View File

@ -87,13 +87,19 @@ controller_lvm_groups: "{{ controller_lvm_groups_default + controller_lvm_groups
# Default list of controller volume groups. See mrlesmithjr.manage-lvm role for
# format.
controller_lvm_groups_default:
- "{{ controller_lvm_group_data }}"
controller_lvm_groups_default: "{{ [controller_lvm_group_data] if controller_lvm_group_data_enabled | bool else [] }}"
# Additional list of controller volume groups. See mrlesmithjr.manage-lvm role
# for format.
controller_lvm_groups_extra: []
# Whether a 'data' LVM volume group should exist on controller hosts. By
# default this contains a 'docker-volumes' logical volume for Docker volume
# storage. It will also be used for Docker container and image storage if
# 'docker_storage_driver' is set to 'devicemapper'. Default is true if
# 'docker_storage_driver' is set to 'devicemapper', or false otherwise.
controller_lvm_group_data_enabled: "{{ docker_storage_driver == 'devicemapper' }}"
# Controller LVM volume group for data. See mrlesmithjr.manage-lvm role for
# format.
controller_lvm_group_data:

View File

@ -43,13 +43,19 @@ seed_lvm_groups: "{{ seed_lvm_groups_default + seed_lvm_groups_extra }}"
# Default list of seed volume groups. See mrlesmithjr.manage-lvm role for
# format.
seed_lvm_groups_default:
- "{{ seed_lvm_group_data }}"
seed_lvm_groups_default: "{{ [seed_lvm_group_data] if seed_lvm_group_data_enabled | bool else [] }}"
# Additional list of seed volume groups. See mrlesmithjr.manage-lvm role for
# format.
seed_lvm_groups_extra: []
# Whether a 'data' LVM volume group should exist on the seed. By default this
# contains a 'docker-volumes' logical volume for Docker volume storage. It will
# also be used for Docker container and image storage if
# 'docker_storage_driver' is set to 'devicemapper'. Default is true if
# 'docker_storage_driver' is set to 'devicemapper', or false otherwise.
seed_lvm_group_data_enabled: "{{ docker_storage_driver == 'devicemapper' }}"
# Seed LVM volume group for data. See mrlesmithjr.manage-lvm role for format.
seed_lvm_group_data:
vgname: data

View File

@ -88,13 +88,19 @@ storage_lvm_groups: "{{ storage_lvm_groups_default + storage_lvm_groups_extra }}
# Default list of storage volume groups. See mrlesmithjr.manage-lvm role for
# format.
storage_lvm_groups_default:
- "{{ storage_lvm_group_data }}"
storage_lvm_groups_default: "{{ [storage_lvm_group_data] if storage_lvm_group_data_enabled | bool else [] }}"
# Additional list of storage volume groups. See mrlesmithjr.manage-lvm role
# for format.
storage_lvm_groups_extra: []
# Whether a 'data' LVM volume group should exist on storage hosts. By default
# this contains a 'docker-volumes' logical volume for Docker volume storage. It
# will also be used for Docker container and image storage if
# 'docker_storage_driver' is set to 'devicemapper'. Default is true if
# 'docker_storage_driver' is set to 'devicemapper', or false otherwise.
storage_lvm_group_data_enabled: "{{ docker_storage_driver == 'devicemapper' }}"
# Storage LVM volume group for data. See mrlesmithjr.manage-lvm role for
# format.
storage_lvm_group_data:

View File

@ -520,11 +520,28 @@ via the ``seed_hypervisor_lvm_group_data_disks`` variable.
LVM for Docker
--------------
The default LVM configuration is optimised for the ``devicemapper`` Docker
storage driver, which requires a thin provisioned LVM volume. A second logical
volume is used for storing Docker volume data, mounted at
``/var/lib/docker/volumes``. Both logical volumes are created from a single
``data`` volume group.
.. note::
In Train and earlier releases of Kayobe, the ``data`` volume group was
always enabled by default.
If the ``devicemapper`` Docker storage driver is in use, the default LVM
configuration is optimised for it. The ``devicemapper`` driver requires a thin
provisioned LVM volume. A second logical volume is used for storing Docker
volume data, mounted at ``/var/lib/docker/volumes``. Both logical volumes are
created from a single ``data`` volume group.
This configuration is enabled by the following variables, which default to
``true`` if the ``devicemapper`` driver is in use or ``false`` otherwise:
* ``compute_lvm_group_data_enabled``
* ``controller_lvm_group_data_enabled``
* ``seed_lvm_group_data_enabled``
* ``storage_lvm_group_data_enabled``
These variables can be set to ``true`` to enable the data volume group if the
``devicemapper`` driver is not in use. This may be useful where the
``docker-volumes`` logical volume is required.
To use this configuration, a list of disks must be configured via the following
variables:

View File

@ -0,0 +1,15 @@
---
upgrade:
- |
The default LVM configuration is now empty for all hosts, unless they are
configured to use the ``devicemapper`` Docker storage driver (which is the
default, but is expected to change in a future release).
Note that while the default LVM configuration existed primarily for the
``devicemapper`` driver, it also included a ``docker-volumes`` logical
volume mounted at ``/var/lib/docker/volumes`` for Docker volumes. If the
``docker-volumes`` volume is required on a host which is not configured to
use the Docker ``devicemapper`` storage driver, the following variables may
be used to enable it: ``compute_lvm_group_data_enabled``,
``controller_lvm_group_data_enabled``, ``seed_lvm_group_data_enabled``,
``storage_lvm_group_data_enabled``.