Repository navigation
JENKINS: test CM's fallback in client-server testing - #6035
Conversation
|
@yosefe can you please review? |
| #get the interface of the ip address that is used to reach The Google Public DNS IP addresses (IPv4). | ||
| #making the assumption that the pure Ethernet IPv4 address on the host is the one used for this purpose. | ||
| eth_iface=$(ip route get 8.8.8.8 | awk -F 'dev' '/dev/{print $2}' | awk '{print $1}') | ||
| ipoib_roce_ifaces=$(ibdev2netdev) |
There was a problem hiding this comment.
can we just find the default gateway?
There was a problem hiding this comment.
ip route show|sed -n 's/default via \(\S*\) dev \(\S*\)/\2/p'
| #the pure Ethernet interface should not appear in the ibdev2netdev output. it should not be an IPoIB or | ||
| #RoCE interface. | ||
| if [ "x${ipoib_roce_ifaces}" != "x" ] && | ||
| [ "x${eth_iface}" != "x" ] && | ||
| [ $(echo "${ipoib_roce_ifaces}" | grep -c "${eth_iface}") -eq 0 ] ; then | ||
| ipaddr=$(ip addr show "${eth_iface}" | awk '/inet /{print $2}' | awk -F '/' '{print $1}') | ||
| else | ||
| echo "Failed to retrieve an IP of a non IPoIB/RoCE interface" >&2 | ||
| fi |
There was a problem hiding this comment.
could be simplified: ibdev2ntdev|grep -w ${iface}
|
|
||
| server_ip=$(get_rdma_device_ip_addr) | ||
| if [ "$server_ip" == "" ] | ||
| server_ip_ib=$(get_rdma_device_ip_addr) |
There was a problem hiding this comment.
server_rdma_addr=
server_nonrdma_addr=
| server_ip_tcp=$(get_tcp_ip_addr) | ||
| if [ "$server_ip_ib" == "" ] && [ "$server_ip_tcp" == "" ] | ||
| then | ||
| return | ||
| fi | ||
|
|
||
| run_client_server_app "./${test_name}" "" "-a ${server_ip}" 1 0 | ||
| for server_ip in $server_ip_ib $server_ip_tcp | ||
| do | ||
| run_client_server_app "./${test_name}" "" "-a ${server_ip}" 1 0 | ||
| done |
There was a problem hiding this comment.
what do you mean? i wanted it to test both IP's so just added a loop
There was a problem hiding this comment.
somehow do it at once without for loop and another if
|
@yosefe Can you take a look please? |
| if [ -z "$(ibdev2netdev | grep -w ${eth_iface})" ] ; then | ||
| ipaddr=$(ip addr show "${eth_iface}" | awk '/inet /{print $2}' | awk -F '/' '{print $1}') | ||
| else | ||
| echo "Failed to retrieve an IP of a non IPoIB/RoCE interface" >&2 |
There was a problem hiding this comment.
echo ...
exit 1
or
echo ...
false
There was a problem hiding this comment.
@yosefe can you please clarify? i'm not sure what you mean to change here
There was a problem hiding this comment.
don't use stderr redirection to make script exit
There was a problem hiding this comment.
i see.
i didn't want to kill Jenkins if there is no eth IP to test, but ok, will change this.
There was a problem hiding this comment.
ok, then no need to redirect to stderr (and also no need to exit 1), just skip this test
There was a problem hiding this comment.
this is what happens now if there is no ip - the error will be printed, nothing would be returned and the fallback won't be tested.
but now that you mentioned it, maybe we do need to force testing an eth ip? if we don't, we might end up not testing the fallback in jenkins for a long while due to a misconfiguration or something on the hosts.
There was a problem hiding this comment.
but now that you mentioned it, maybe we do need to force testing an eth ip? if we don't, we might end up not testing the fallback in jenkins for a long while due to a misconfiguration or something on the hosts.
ok, we should expect to always have an Eth device for TCP
| echo $ipaddr | ||
| } | ||
|
|
||
| get_tcp_ip_addr() { |
|
|
||
| export UCX_SOCKADDR_CM_ENABLE=y | ||
| run_client_server_app "./test/apps/iodemo/${test_name}" "${test_args}" "${server_ip}" 1 0 | ||
| for server_ip in $server_rdma_addr $server_nonrdma_addr |
There was a problem hiding this comment.
remove UCX_SOCKADDR_CM_ENABLE=y ?
| echo "Failed to retrieve an IP of a non IPoIB/RoCE interface" >&2 | ||
| fi | ||
|
|
||
| echo $ipaddr |
There was a problem hiding this comment.
why needed? we will see this value when used for client-server
|
@yosefe updated, please review. |
| else | ||
| echo "Failed to retrieve an IP of a non IPoIB/RoCE interface" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
pls use tabs indentation as in the rest of the file
|
@yosefe please review again |
| exit 1 | ||
| fi | ||
|
|
||
| echo $(get_ifaddr ${eth_iface}) |
There was a problem hiding this comment.
no need echo
just get_ifaddr "${eth_iface}"
|
|
||
| run_client_server_app() { | ||
| test_name=$1 | ||
| test_name_to_run=$1 |
|
@yosefe have another look please. |
| } | ||
|
|
||
| get_non_rdma_ip_addr() { | ||
| if ! which ibdev2netdev >&/dev/null |
There was a problem hiding this comment.
I updated.
sorry, didn't notice before that the whole function didn't have the correct indentation
e0a4948 to
b89a4e4
Compare
|
squashed |
|
failure is #6088 |
No description provided.