From 2d03b8ac447792d6cdfb0a36241fff77c645541e Mon Sep 17 00:00:00 2001 From: Ben Walker Date: Thu, 17 Sep 2020 15:59:32 -0700 Subject: [PATCH] test/iscsi: In ip_migration.sh, use 'ip' to add and remove IP addresses This eliminates the only known use of the net_interface_* RPCs. These RPCs are also undocumented. Change-Id: I92e2dd9ebd59a80518aed5a77aa7f3ccf0371c9a Signed-off-by: Ben Walker Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4304 Tested-by: SPDK CI Jenkins Reviewed-by: Tomasz Zawadzki Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto --- test/iscsi_tgt/ip_migration/ip_migration.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/iscsi_tgt/ip_migration/ip_migration.sh b/test/iscsi_tgt/ip_migration/ip_migration.sh index 55732ccd9..402f676f7 100755 --- a/test/iscsi_tgt/ip_migration/ip_migration.sh +++ b/test/iscsi_tgt/ip_migration/ip_migration.sh @@ -10,9 +10,6 @@ iscsitestinit rpc_py="$rootdir/scripts/rpc.py" fio_py="$rootdir/scripts/fio.py" -# Namespaces are NOT used here on purpose. This test requires changes to detect -# ifc_index for interface that was put into namespace. Needed for net_interface_add_ip_address. -# Reset ISCSI_APP[] to use only the plain app for this test without TARGET_NS_CMD preset. source "$rootdir/test/common/applications.sh" NETMASK=127.0.0.0/24 MIGRATION_ADDRESS=127.0.0.2 @@ -25,10 +22,10 @@ function kill_all_iscsi_target() { } function rpc_add_target_node() { - $rpc_py -s $1 net_interface_add_ip_address 1 $MIGRATION_ADDRESS + "${TARGET_NS_CMD[@]}" ip addr add $MIGRATION_ADDRESS/24 dev $TARGET_INTERFACE $rpc_py -s $1 iscsi_create_portal_group $PORTAL_TAG $MIGRATION_ADDRESS:$ISCSI_PORT $rpc_py -s $1 iscsi_create_target_node target1 target1_alias 'Malloc0:0' $PORTAL_TAG:$INITIATOR_TAG 64 -d - $rpc_py -s $1 net_interface_delete_ip_address 1 $MIGRATION_ADDRESS + "${TARGET_NS_CMD[@]}" ip addr del $MIGRATION_ADDRESS/24 dev $TARGET_INTERFACE } function iscsi_tgt_start() {