Skip to content

Commit

Permalink
container: conditionnally disable lvmetad
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
guits committed May 25, 2021
1 parent 589a571 commit 71bd606
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions group_vars/all.yml.sample
Expand Up @@ -342,6 +342,7 @@ dummy:

## OSD options
#
#lvmetad_disabled: false
#is_hci: false
#hci_safety_factor: 0.2
#non_hci_safety_factor: 0.7
Expand Down
1 change: 1 addition & 0 deletions group_vars/rhcs.yml.sample
Expand Up @@ -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
Expand Down
18 changes: 18 additions & 0 deletions roles/ceph-container-common/tasks/prerequisites.yml
@@ -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 }}"
Expand Down
1 change: 1 addition & 0 deletions roles/ceph-defaults/defaults/main.yml
Expand Up @@ -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
Expand Down

0 comments on commit 71bd606

Please sign in to comment.