]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
container: conditionnally disable lvmetad
authorGuillaume Abrioux <gabrioux@redhat.com>
Fri, 21 May 2021 11:25:25 +0000 (13:25 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 15 Jun 2021 18:16:38 +0000 (20:16 +0200)
Enabling lvmetad in containerized deployments on el7 based OS might
cause issues.
This commit make it possible to disable this service if needed.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1955040
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
group_vars/all.yml.sample
group_vars/rhcs.yml.sample
roles/ceph-container-common/tasks/prerequisites.yml
roles/ceph-defaults/defaults/main.yml

index 83dc3b1c740fd69aeeffeecdffb7bcdf24ddf652..57d7ef1e02b7fc5d06ac0a953ba05cadcf285ce6 100644 (file)
@@ -343,6 +343,7 @@ dummy:
 
 ## OSD options
 #
+#lvmetad_disabled: false
 #is_hci: false
 #hci_safety_factor: 0.2
 #non_hci_safety_factor: 0.7
index cc1f650c617edb755ec55adb14af2a03af52c447..8559c3ca770f77fdf711a16aa3e160ad6cf9f314 100644 (file)
@@ -343,6 +343,7 @@ ceph_iscsi_config_dev: false
 
 ## OSD options
 #
+#lvmetad_disabled: false
 #is_hci: false
 #hci_safety_factor: 0.2
 #non_hci_safety_factor: 0.7
index c7761c311fe9a1153e6edfbfa6236316bbd89882..cd4e801b6ab81f52b22675c05824b521bf39c204 100644 (file)
@@ -1,4 +1,22 @@
 ---
+- name: lvmetad tasks related
+  when:
+    - inventory_hostname in groups.get(osd_group_name, [])
+    - lvmetad_disabled | default(False) | bool
+    - ansible_facts['os_family'] == 'RedHat'
+    - ansible_facts['distribution_major_version'] | int == 7
+  block:
+    - name: stop lvmetad
+      service:
+        name: lvm2-lvmetad
+        state: stopped
+
+    - name: disable and mask lvmetad service
+      service:
+        name: lvm2-lvmetad
+        enabled: no
+        masked: yes
+
 - name: remove ceph udev rules
   file:
     path: "{{ item }}"
index ff1763494030a7eb80eb8454bd816271bf550e94..a22687d343917944462aff2361ce28eba3378735 100644 (file)
@@ -335,6 +335,7 @@ cephfs_pools:
 
 ## OSD options
 #
+lvmetad_disabled: false
 is_hci: false
 hci_safety_factor: 0.2
 non_hci_safety_factor: 0.7