Skip to content

Commit 838d67d

Browse files
committed
add checks for ofed packages
1 parent a9e9afd commit 838d67d

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

ansible/fatimage.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@
207207
gather_facts: yes
208208
tags: finalise
209209
tasks:
210+
- name: Carry out checks on image
211+
import_role:
212+
name: builder
213+
tasks_from: checks.yml
210214
- name: Finalise image
211215
import_role:
212216
name: builder
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
- name: Check whether OFED is installed
2+
command: ofed_info
3+
changed_when: false
4+
failed_when:
5+
- _ofed_info.rc > 0
6+
- "'No such file or directory' not in _ofed_info.msg"
7+
register: _ofed_info
8+
9+
- name: Get package facts
10+
package_facts:
11+
12+
- name: Check e.g. libfabric package hasn't downgraded OFED-installed packages
13+
assert:
14+
that: "'mlnx' in ansible_facts.packages[item].0.version"
15+
fail_msg: "OFED is installed but package {{ item }} has a non-OFED version: {{ ansible_facts.packages[item].0.version }}"
16+
when: "'MLNX_OFED_LINUX-' in _ofed_info.stdout"
17+
loop: "{{ builder_ofed_check_packages }}"
18+
vars:
19+
builder_ofed_check_packages:
20+
- ibacm
21+
- infiniband-diags
22+
- libibumad
23+
- libibverbs
24+
- libibverbs-utils
25+
- librdmacm
26+
- librdmacm-utils
27+
- rdma-core-devel
28+
- rdma-core # didn't actually see this one get downgraded
29+

0 commit comments

Comments
 (0)