Skip to content

JENKINS: test CM's fallback in client-server testing - #6035

Merged
yosefe merged 1 commit into
openucx:masterfrom
alinask:topic/jenkins-io-demo-tcp-ip
Jan 4, 2021
Merged

yosefe merged 1 commit into
openucx:masterfrom
alinask:topic/jenkins-io-demo-tcp-ip

Conversation

@alinask

@alinask alinask commented Dec 16, 2020

Copy link
Copy Markdown
Contributor

No description provided.

@alinask

alinask commented Dec 17, 2020

Copy link
Copy Markdown
Contributor Author

@yosefe can you please review?

Comment thread contrib/test_jenkins.sh Outdated
Comment on lines +315 to +318
#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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we just find the default gateway?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this it?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls simplify the code

@yosefe yosefe Dec 30, 2020 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread contrib/test_jenkins.sh Outdated
Comment on lines +320 to +328
#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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be simplified: ibdev2ntdev|grep -w ${iface}

Comment thread contrib/test_jenkins.sh Outdated

server_ip=$(get_rdma_device_ip_addr)
if [ "$server_ip" == "" ]
server_ip_ib=$(get_rdma_device_ip_addr)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

server_rdma_addr=
server_nonrdma_addr=

Comment thread contrib/test_jenkins.sh Outdated
Comment on lines +970 to +979
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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we simplify this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you mean? i wanted it to test both IP's so just added a loop

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

somehow do it at once without for loop and another if

@alinask

alinask commented Dec 30, 2020

Copy link
Copy Markdown
Contributor Author

@yosefe Can you take a look please?

Comment thread contrib/test_jenkins.sh Outdated
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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

echo ...
exit 1
or
echo ...
false

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yosefe can you please clarify? i'm not sure what you mean to change here

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't use stderr redirection to make script exit

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see.
i didn't want to kill Jenkins if there is no eth IP to test, but ok, will change this.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, then no need to redirect to stderr (and also no need to exit 1), just skip this test

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread contrib/test_jenkins.sh Outdated
echo $ipaddr
}

get_tcp_ip_addr() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_non_rdma_ip_addr

Comment thread contrib/test_jenkins.sh

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove UCX_SOCKADDR_CM_ENABLE=y ?

Comment thread contrib/test_jenkins.sh Outdated
echo "Failed to retrieve an IP of a non IPoIB/RoCE interface" >&2
fi

echo $ipaddr

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why needed? we will see this value when used for client-server

@alinask

alinask commented Jan 3, 2021

Copy link
Copy Markdown
Contributor Author

@yosefe updated, please review.

Comment thread contrib/test_jenkins.sh Resolved
Comment thread contrib/test_jenkins.sh Resolved
Comment thread contrib/test_jenkins.sh Resolved
Comment thread contrib/test_jenkins.sh Outdated
Comment on lines +323 to +326
else
echo "Failed to retrieve an IP of a non IPoIB/RoCE interface"
exit 1
fi

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls use tabs indentation as in the rest of the file

Comment thread contrib/test_jenkins.sh Resolved
Comment thread contrib/test_jenkins.sh Resolved
Comment thread contrib/test_jenkins.sh Resolved
@alinask

alinask commented Jan 3, 2021

Copy link
Copy Markdown
Contributor Author

@yosefe please review again

@yosefe yosefe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unresolved: #6035 (comment)

Comment thread contrib/test_jenkins.sh Outdated
exit 1
fi

echo $(get_ifaddr ${eth_iface})

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need echo
just get_ifaddr "${eth_iface}"

Comment thread contrib/test_jenkins.sh Outdated

run_client_server_app() {
test_name=$1
test_name_to_run=$1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test_exe

@alinask

alinask commented Jan 3, 2021

Copy link
Copy Markdown
Contributor Author

@yosefe have another look please.

Comment thread contrib/test_jenkins.sh Outdated
}

get_non_rdma_ip_addr() {
if ! which ibdev2netdev >&/dev/null

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls use tabs for indentation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated.
sorry, didn't notice before that the whole function didn't have the correct indentation

@alinask
alinask force-pushed the topic/jenkins-io-demo-tcp-ip branch from e0a4948 to b89a4e4 Compare January 4, 2021 07:59
@alinask

alinask commented Jan 4, 2021

Copy link
Copy Markdown
Contributor Author

squashed

@alinask

alinask commented Jan 4, 2021

Copy link
Copy Markdown
Contributor Author

failure is #6088

@yosefe
yosefe merged commit 8587242 into openucx:master Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants