From 79c904c1e51646e1d7ecefcd2da610bf682234c6 Mon Sep 17 00:00:00 2001 From: Nathan Rutman Date: Thu, 10 Jun 2010 16:16:57 -0700 Subject: [PATCH] b=15253 fix conf-sanity 30b for non-tcp networks --- lustre/tests/conf-sanity.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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 -- 1.8.3.1