Whamcloud - gitweb
LU-12205 tests: host_nids_address() fix for MR setup 23/34723/10
authorElena Gryaznova <c17455@cray.com>
Fri, 19 Apr 2019 12:39:32 +0000 (15:39 +0300)
committerOleg Drokin <green@whamcloud.com>
Tue, 2 Jun 2020 04:42:07 +0000 (04:42 +0000)
Patch fixes t-f:host_nids_address() to work properly
on multiple networks setup.

Example:
With MR setup we have:
lctl list_nids
192.168.101.3@tcp
10.0.101.3@tcp1
10.0.201.3@tcp2
For NETTYPE=tcp host_nids_address() should give the result
192.168.101.3 only.

Test-Parameters: trivial testlist=sanity,sanityn,sanity-sec,\
lnet-selftest,conf-sanity,obdfilter-survey

Signed-off-by: Elena Gryaznova <c17455@cray.com>
Cray-bug-id: LUS-7150
Reviewed-by: Alexey Lyashkov <c17817@cray.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Change-Id: Ida397f1811be142c5aa8813f32461b83d6113fc2
Reviewed-on: https://review.whamcloud.com/34723
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/test-framework.sh

index 6e007fa..3f1c0ae 100755 (executable)
@@ -3706,7 +3706,7 @@ host_nids_address() {
        local nodes=$1
        local net=${2:-"."}
 
-       do_nodes $nodes "$LCTL list_nids | grep $net | cut -f 1 -d @"
+       do_nodes $nodes "$LCTL list_nids | grep -w $net | cut -f 1 -d @"
 }
 
 h2name_or_ip() {