From: Nathan Rutman Date: Thu, 10 Jun 2010 23:16:57 +0000 (-0700) Subject: b=15253 fix conf-sanity 30b for non-tcp networks X-Git-Tag: v1_8_3_54~20 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=79c904c1e51646e1d7ecefcd2da610bf682234c6;p=fs%2Flustre-release.git b=15253 fix conf-sanity 30b for non-tcp networks --- diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index 883f2a9..19bd80b 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -1091,8 +1091,16 @@ run_test 30a "Big config llog and conf_param deletion" test_30b() { setup - NEW="1.2.3.4@tcp" - TEST="lctl get_param -n osc.$FSNAME-OST0000-osc-[^M]*.import | grep failover_nids | sed -n 's/.*\($NEW\).*/\1/p'" + # Make a fake nid. Use the OST nid, and add 20 to the least significant + # numerical part of it. Hopefully that's not already a failover address for + # the server. + OSTNID=$(do_facet ost1 "$LCTL get_param nis" | tail -1 | awk '{print $1}') + ORIGVAL=$(echo $OSTNID | egrep -oi "[0-9]*@") + NEWVAL=$((($(echo $ORIGVAL | egrep -oi "[0-9]*") + 20) % 256)) + NEW=$(echo $OSTNID | sed "s/$ORIGVAL/$NEWVAL@/") + echo "Using fake nid $NEW" + + TEST="$LCTL get_param -n osc.$FSNAME-OST0000-osc-[^M]*.import | grep failover_nids | sed -n 's/.*\($NEW\).*/\1/p'" set_and_check client "$TEST" "$FSNAME-OST0000.failover.node" $NEW || error "didn't add failover nid $NEW" NIDS=$($LCTL get_param -n osc.$FSNAME-OST0000-osc-[^M]*.import | grep failover_nids) echo $NIDS