From a5dc813bab19dffe02dadfb58c19b455df199a08 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Mon, 13 Aug 2018 21:33:02 +0200 Subject: Prevent IB from crashing Fedora systems, mount Ands shared NFS storage, support development files on CentOS --- roles/ib/handlers/main.yml | 16 ++++++++++++++++ roles/ib/tasks/main.yml | 16 ++++++++++++++++ roles/ib/templates/00-ibnm.rules.j2 | 2 ++ roles/ib/templates/mlx.conf.j2 | 1 + 4 files changed, 35 insertions(+) create mode 100644 roles/ib/handlers/main.yml create mode 100644 roles/ib/tasks/main.yml create mode 100644 roles/ib/templates/00-ibnm.rules.j2 create mode 100644 roles/ib/templates/mlx.conf.j2 (limited to 'roles/ib') diff --git a/roles/ib/handlers/main.yml b/roles/ib/handlers/main.yml new file mode 100644 index 0000000..75661b9 --- /dev/null +++ b/roles/ib/handlers/main.yml @@ -0,0 +1,16 @@ +--- +- name: Unload mlx4_ib + modprobe: name="mlx4_ib" state="absent" + listen: mlx-reload + +- name: Unload mlx4_en + modprobe: name="mlx4_en" state="absent" + listen: mlx-reload + +- name: Unload mlx4_core + modprobe: name="mlx4_core" state="absent" + listen: mlx-reload + +- name: Load mlx4_en + modprobe: name="mlx4_en" state="present" + listen: mlx-reload diff --git a/roles/ib/tasks/main.yml b/roles/ib/tasks/main.yml new file mode 100644 index 0000000..45612ec --- /dev/null +++ b/roles/ib/tasks/main.yml @@ -0,0 +1,16 @@ +--- +- name: Find infiniband interface files + find: paths="/etc/sysconfig/network-scripts/" patterns="ifcfg-ib*" + register: result + +- name: Remove infiniband files from sysconfig + file: path="{{ item.path }}" state="absent" + with_items: "{{ result.files }}" + +- name: Set udev rules + template: src="00-ibnm.rules.j2" dest="/etc/udev/rules.d/00-ibnm.rules" owner="root" group="root" mode="0644" + +- name: Set mellanox options + template: src="mlx.conf.j2" dest="/etc/modprobe.d/mlx.conf" owner="root" group="root" mode="0644" + notify: mlx-reload + diff --git a/roles/ib/templates/00-ibnm.rules.j2 b/roles/ib/templates/00-ibnm.rules.j2 new file mode 100644 index 0000000..7025eab --- /dev/null +++ b/roles/ib/templates/00-ibnm.rules.j2 @@ -0,0 +1,2 @@ +ENV{INTERFACE}=="ib[0-9]*" ENV{NM_UNMANAGED}="1" +ENV{ID_NET_DRIVER}=="mlx4_*", ENV{NM_UNMANAGED}="1" diff --git a/roles/ib/templates/mlx.conf.j2 b/roles/ib/templates/mlx.conf.j2 new file mode 100644 index 0000000..df8a3ab --- /dev/null +++ b/roles/ib/templates/mlx.conf.j2 @@ -0,0 +1 @@ +options mlx4_core log_num_mgm_entry_size=-1 -- cgit v1.2.3