-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsiw-test.sh
More file actions
executable file
·181 lines (156 loc) · 4.22 KB
/
siw-test.sh
File metadata and controls
executable file
·181 lines (156 loc) · 4.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
#!/bin/bash
# hpc-testing
# Copyright (C) 2022 SUSE LLC
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
DEFAULT_IPPORT1=eth0
DEFAULT_IPPORT2=eth0
export IPPORT1=""
export IPPORT2=""
export DO_MAD=0
source $(dirname $0)/helpers/common.sh
load_helpers $(dirname $0) "common" "siw"
usage(){
echo "Usage: ${0} [options] <host1> <host2>"
echo "Options:"
common_usage
echo " --eth1 <ifname> Name of the IP interface to setup/use for RXE on host1 (default is $DEFAULT_IPPORT1)"
echo " --eth2 <ifname> Name of the IP interface to setup/use for RXE on host2 (default is $DEFAULT_IPPORT2)"
}
while [ $# -ne 0 ]; do
common_parse $1 $2
ret=$?
if [ $ret -ne 0 ]; then
shift $ret
continue
fi
case $1 in
--eth1)
IPPORT1=$2
shift
;;
--eth2)
IPPORT2=$2
shift
;;
*)
fatal_error "Unknow argument $1"
;;
esac
shift
done
common_check
if [ "$IPPORT1" == "" ]; then
export IPPORT1=$(tpq $HOST1 "ip addr" | ip_addr_show_to_dev $HOST1)
fi
if [ "$IPPORT1" == "" ]; then
fatal_error "No ethernet device specified or found for $HOST1"
fi
if [ "$IPPORT2" == "" ]; then
export IPPORT2=$(tpq $HOST2 "ip addr" | ip_addr_show_to_dev $HOST2)
fi
if [ "$IPPORT2" == "" ]; then
fatal_error "No ethernet device specified or found for $HOST2"
fi
juLogSetProperty host1.name $HOST1
juLogSetProperty host2.name $HOST2
#########################
#
# Phase 0: State cleanup
# - Install required packages
# - Reset everything needed to mimic an after-reboot run
#
#########################
phase_0(){
juLog_fatal -name=h1_setup_requirements "setup_requirements $HOST1"
juLog_fatal -name=h2_setup_requirements "setup_requirements $HOST2"
# Remove all RDMA ports first just to be sure
juLog_fatal -name=h1_remove_rdma_ports "disable_unused_rdma_ports $HOST1"
juLog_fatal -name=h2_remove_rdma_ports "disable_unused_rdma_ports $HOST2"
juLog -name=h1_firewall_down "firewall_down $HOST1"
juLog -name=h2_firewall_down "firewall_down $HOST2"
}
run_phase 0 phase_0 "State Cleanup"
set_properties $HOST1
set_properties $HOST2
juLogSetProperty $HOST1.siw_eth $IPPORT1
juLogSetProperty $HOST2.siw_eth $IPPORT2
#########################
#
# Phase 1: Fabric init
# - SSH known key setup to as some tests will fail if
# hosts do not know each other
# - Device status check
#
#########################
# Do not wrap these as they export needed variables
get_srdma_port $HOST1 1 siw
get_srdma_port $HOST2 2 siw
phase_1(){
juLog_fatal -name=h1_setup_ssh_keys "setup_ssh $HOST1 $IP2"
juLog_fatal -name=h2_setup_ssh_keys "setup_ssh $HOST2 $IP1"
juLog_fatal -name=h1_ibvinfo tp $HOST1 ibv_devinfo
juLog_fatal -name=h2_ibvinfo tp $HOST2 ibv_devinfo
}
run_phase 1 phase_1 "Fabric init"
#########################
#
# Skipping these not applicable phases
# Phase 2: IPoIB
# Phase 3: SM Failover
# Phase 4: SRP
#
#########################
#########################
#
# Phase 5: NFSoRDMA
#
#########################
phase_5(){
juLog -name=nfs_over_rdma test_nfs $HOST1 $IP1 $HOST2
}
run_phase 5 phase_5 "NFSoRDMA"
#########################
#
# Not applicable
# Phase 6: DAPL
#
#########################
#########################
#
# Phase 7: RDMA/Verbs
# Seems broken (or unimplemented)
#
#########################
#########################
#
# Too much unsupported tests
# Phase 8: MPI
#
#########################
#########################
#
# Too much unsupported tests
# Phase 9: libfabric
#
#########################
#########################
#
# Phase 10: NVMEoF
#
#########################
phase_10(){
juLog -name=nvme test_nvme $HOST2 $IP2 $HOST1
}
run_phase 10 phase_10 "nvme"