Whamcloud - gitweb
LU-17667 tests: Handle more than 1 IP returned by 'ip' cmd
An interface could have more than one IP address. This may
be not normal and is a corner case. This patch handles case
where 'ip' command returns more than single IP and also adds
new info/debug messages.
Corner Case:
ip -o -4 a s enp0s8 | awk '{print $4}' | sed 's/\/.*//'
192.168.50.188
192.168.1.12
Before patch:
sanity-lnet.sh line 1174: ((: 188 12: syntax error in expression
(error token is "12")
After patch:
...
IP for enp0s8 found [2]
Interface:IP are
enp0s8:192.168.50.188
enp0s8:192.168.1.12
Using GW_NID:192.168.50.189@tcp
...
Test-Parameters: trivial testlist=sanity-lnet
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I783a6b67508a4497d18db94b5d2bdab616b4ade5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54547
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>