Skip to content

Commit

Permalink
Merge pull request #13 from mila-iqia/feat/optional_connected_mode
Browse files Browse the repository at this point in the history
feat: Add new parameter infiniband_ipoib_enhanced
  • Loading branch information
btravouillon authored Aug 3, 2022
2 parents 939ad65 + 5815c82 commit 40a9b23
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,9 @@ infiniband_install_kernel_modules: True
# given VM could run.
#
infiniband_guid_prefix: "4d:69:6c:61:00"

# Configure Enhanced IPoIB
# For ConnectX-4 and later, Mellanox recommends to keep Enhanced IPoIB enabled.
# This parameter only has effect on RHEl-like OS. If set to False, the IPoIB
# interfaces will default to Connected mode.
infiniband_ipoib_enhanced: True
5 changes: 5 additions & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
name: openibd.service
state: started

- name: Restart openibd
ansible.builtin.systemd:
name: openibd.service
state: restarted

- name: Reboot to load new configurations
throttle: 1
ansible.builtin.reboot:
Expand Down
6 changes: 6 additions & 0 deletions tasks/configure-RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@
label: "Configure {{ item.iface }}"
notify: Restart interface
register: configure_ipoib

- name: Configure ipoib_enhanced
ansible.builtin.lineinfile:
path: /etc/modprobe.d/ib_ipoib_enhanced.conf
line: "options ib_ipoib ipoib_enhanced={{ infiniband_ipoib_enhanced | bool }}"
notify: Restart openibd
2 changes: 2 additions & 0 deletions templates/ifcfg-ib.j2
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ BOOTPROTO=static
ONBOOT=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
{% if not infiniband_ipoib_enhanced %}
MTU=65520
CONNECTED_MODE=yes
{% endif %}

0 comments on commit 40a9b23

Please sign in to comment.