Ensure cinder-volumes tool packages install correct ceph dependancies

The cinder-volumes service requires a set of tools installed from
distro packages, which have dependancies on librados and librbd. This
patch moves the installation of these tools to after the point that
the ceph_client role has run. This ensures that the ceph repo config
is correct and in the case of ubuntu any necessary apt pins have
been installed. This prevents issues where packages in the distro
repo may have sematically higher version numbers that the ceph
repo and then require a package downgrade - this leads to an install
failure.

Change-Id: I9de3a3566df913487b0cbf971c4006e9e52feaac
This commit is contained in:
Jonathan Rosser 2019-02-11 11:20:47 +00:00
parent 84fe27fe16
commit 2e08d866e4
4 changed files with 25 additions and 3 deletions

View File

@ -145,6 +145,22 @@
tags:
- ceph
# NOTE(jrosser) Tools required by cinder-volumes may have dependancies on librados and librbd
# so are installed after the ceph_client role is run to ensure that the ceph repos setup
# is in place.
- name: Install cinder volumes distro tool packages
package:
name: "{{ cinder_volume_distro_packages_tools }}"
state: "{{ cinder_package_state }}"
update_cache: "{{ (ansible_pkg_mgr in ['apt', 'zypper']) | ternary('yes', omit) }}"
cache_valid_time: "{{ (ansible_pkg_mgr == 'apt') | ternary(cache_timeout, omit) }}"
register: install_packages
until: install_packages is success
retries: 5
delay: 2
when:
- "cinder_services['cinder-volume']['group'] in group_names"
- name: Flush handlers
meta: flush_handlers

View File

@ -39,7 +39,9 @@ cinder_devel_distro_packages:
- systemd-devel
- zlib-devel
cinder_volume_distro_packages:
cinder_volume_distro_packages: []
cinder_volume_distro_packages_tools:
- qemu-img-ev
- iscsi-initiator-utils
- nfs-utils

View File

@ -45,7 +45,9 @@ cinder_devel_distro_packages:
- systemd-devel
- zlib-devel
cinder_volume_distro_packages:
cinder_volume_distro_packages: []
cinder_volume_distro_packages_tools:
- qemu-tools
- open-iscsi
- nfs-utils

View File

@ -50,7 +50,9 @@ cinder_devel_distro_packages:
- libxslt1-dev
- libsystemd-dev
cinder_volume_distro_packages:
cinder_volume_distro_packages: []
cinder_volume_distro_packages_tools:
- qemu-utils
- open-iscsi
- nfs-common