]> 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)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Tue, 14 Jan 2020 17:47:55 +0000 (12:47 -0500)
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>
(cherry picked from commit de8f2a9f83194e465d10207c7ae0569700345b9c)

roles/ceph-container-engine/tasks/pre_requisites/prerequisites.yml
roles/ceph-osd/tasks/main.yml

index 76705758b4b26bb4abf6b2f709956329f2aa24e6..c011237c1c8cd331549a3d2755ead795347b5400 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 c8f4920805ca44ca3bec4c6bacb9ee30ad16205d..b1c693e9ceb0d1e3f0d1ba6757a130564642c4c1 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