Skip to content

Commit 933dcf4

Browse files
authored
Fix NHC downing nodes due to /efi being mounted twice (#719)
1 parent e1de488 commit 933dcf4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ansible/roles/nhc/templates/nhc.conf.j2

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
* || HOSTNAME="$HOSTNAME_S"
55

66
## Filesystem checks
7-
{% for mount in ansible_mounts %}
7+
{% for mount in ansible_mounts | rejectattr('mount', 'eq', '/efi') %}
8+
{# /efi is mounted both directly and via systemd1 autofs, which NHC can't cope with #}
9+
{# use `awk '{print $5 " " $10 " " $4 " " $9}' /proc/self/mountinfo | sort -k1` to check that is the only case #}
810
{% set mount_mode = 'rw' if 'rw' in mount.options.split(',') else 'ro' %}
911
{{ ansible_fqdn }} || check_fs_mount_{{ mount_mode }} -t "{{ mount.fstype }}" -s "{{ mount.device }}" -f "{{ mount.mount }}"
1012
{% endfor %}

0 commit comments

Comments
 (0)