Update manage-lvm role to v0.1.4

This role now expects disks to be passed as a list instead of a
comma-separated string.

This commit updates group variables to stop transforming disk lists to
comma-separated strings and adds a check for users overriding LVM
variables. The playbook is also tagged as upgrade-check.

Change-Id: Ia8001c28a8be034ae79a1c584beb40bc66891db3
This commit is contained in:
Pierre Riteau 2018-12-20 22:58:18 +01:00 committed by Mark Goddard
parent 62aa5d015f
commit 1a3de5e799
7 changed files with 27 additions and 5 deletions

View File

@ -75,7 +75,7 @@ compute_lvm_groups_extra: []
# format.
compute_lvm_group_data:
vgname: data
disks: "{{ compute_lvm_group_data_disks | join(',') }}"
disks: "{{ compute_lvm_group_data_disks }}"
create: True
lvnames: "{{ compute_lvm_group_data_lvs }}"

View File

@ -86,7 +86,7 @@ controller_lvm_groups_extra: []
# format.
controller_lvm_group_data:
vgname: data
disks: "{{ controller_lvm_group_data_disks | join(',') }}"
disks: "{{ controller_lvm_group_data_disks }}"
create: True
lvnames: "{{ controller_lvm_group_data_lvs }}"

View File

@ -41,7 +41,7 @@ seed_lvm_groups_extra: []
# Seed LVM volume group for data. See mrlesmithjr.manage-lvm role for format.
seed_lvm_group_data:
vgname: data
disks: "{{ seed_lvm_group_data_disks | join(',') }}"
disks: "{{ seed_lvm_group_data_disks }}"
create: True
lvnames: "{{ seed_lvm_group_data_lvs }}"

View File

@ -74,7 +74,7 @@ storage_lvm_groups_extra: []
# format.
storage_lvm_group_data:
vgname: data
disks: "{{ storage_lvm_group_data_disks | join(',') }}"
disks: "{{ storage_lvm_group_data_disks }}"
create: True
lvnames: "{{ storage_lvm_group_data_lvs }}"

View File

@ -3,6 +3,7 @@
hosts: seed:overcloud
tags:
- lvm
- upgrade-check
pre_tasks:
- name: Fail if the LVM physical disks have not been configured
fail:
@ -12,6 +13,14 @@
has a valid 'disks' list.
with_items: "{{ lvm_groups | default([]) }}"
when: not item.disks | default([]) or 'changeme' in item.disks | default([])
- name: Fail if the LVM physical disks are configured as a comma-separated string
fail:
msg: >
The physical disk list for volume {{ item.vgname }} must be
configured as a list instead of a comma-separated string. Ensure that
each volume group in 'lvm_groups' has a valid 'disks' list.
with_items: "{{ lvm_groups | default([]) }}"
when: item.disks | string() == item.disks
roles:
- role: mrlesmithjr.manage-lvm
manage_lvm: True

View File

@ -0,0 +1,13 @@
---
upgrade:
- |
The manage-lvm Ansible role was upgraded to version v0.1.4. If you are
overriding variables to customize definitions of volume groups, you need to
change the value of the ``disks`` parameter from a comma-separated string to a
list. For example, change ``disks: "/dev/sda,/dev/sdb"`` to:
.. code-block:: text
disks:
- "/dev/sda"
- "/dev/sdb"

View File

@ -7,7 +7,7 @@
- src: MichaelRigart.interfaces
version: v1.1.0
- src: mrlesmithjr.manage-lvm
version: v0.1.1
version: v0.1.4
- src: resmo.ntp
version: 0.4.0
- src: singleplatform-eng.users