]> 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, 25 May 2021 14:50:30 +0000 (16:50 +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 c936eefa5573ddb4370e3448e0832c5fd5be0f37..21120e3bc6994e808d556ba7ed855a891ec41a8c 100644 (file)
@@ -342,6 +342,7 @@ dummy:
 
 ## OSD options
 #
+#lvmetad_disabled: false
 #is_hci: false
 #hci_safety_factor: 0.2
 #non_hci_safety_factor: 0.7
index 019d63bbd0166eb0517c7f6fae460e3d9bd3f0f8..74a4e0e38d3285f8ab94f0465d4ca433200e3e57 100644 (file)
@@ -342,6 +342,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..1baf96a055cba3b2ccf3257a05dff3cb060cda7d 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: lvmetad
+        state: stopped
+
+    - name: disable and mask lvmetad service
+      service:
+        name: lvmetad
+        enabled: no
+        masked: yes
+
 - name: remove ceph udev rules
   file:
     path: "{{ item }}"
index 08fb9813f5f103ba3e12839507726f44f01f86d7..e14390bf8ac55b6680bd9d16116ad22a038f6b9f 100644 (file)
@@ -334,6 +334,7 @@ cephfs_pools:
 
 ## OSD options
 #
+lvmetad_disabled: false
 is_hci: false
 hci_safety_factor: 0.2
 non_hci_safety_factor: 0.7