]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
container: move lvm2 package installation
authorDimitri Savineau <dsavinea@redhat.com>
Thu, 2 Jan 2020 20:50:24 +0000 (15:50 -0500)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 8 Jan 2020 10:13:46 +0000 (11:13 +0100)
Before this patch, the lvm2 package installation was done during the
ceph-osd role.
However we were running ceph-volume command in the ceph-config role
before ceph-osd. If lvm2 wasn't installed then the ceph-volume command
fails:

error checking path "/run/lock/lvm": stat /run/lock/lvm: no such file or
directory

This wasn't visible before because lvm2 was automatically installed as
docker dependency but it's not the same for podman on CentOS 8.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
roles/ceph-container-engine/tasks/pre_requisites/prerequisites.yml
roles/ceph-osd/tasks/main.yml

index 1bb6deda4ae2d3608356d9aca53c9b630f5f0def..f4533c4b8dc09de2f367f1e1ccabdf2a1dca4c80 100644 (file)
   tags:
     with_pkg
 
-- name: install container package
+- name: install container and lvm2 packages
   package:
-    name: ['{{ container_package_name }}', '{{ container_binding_name }}']
+    name: ['{{ container_package_name }}', '{{ container_binding_name }}', 'lvm2']
     update_cache: true
+  register: result
+  until: result is succeeded
   tags: with_pkg
 
 - name: start container service
index 00a20624a9e46d3d5d12981a342fc0053f98c7ca..e4208e8126b01924bdaa87ae6a938f56a8d448a6 100644 (file)
     - ceph_osd_numactl_opts | length > 0
   tags: with_pkg
 
-- name: install lvm2
-  package:
-    name: lvm2
-  register: result
-  until: result is succeeded
-  when: not is_atomic | bool
-  tags: with_pkg
-
 - name: include_tasks common.yml
   include_tasks: common.yml