test/migration: fix migration tc3
- Removed hardcoded IP addresses, now passing IPs as parameters. - Modified sshfs command Change-Id: I98e837746d35ed5ab903a6d6327b84158ca0dd94 Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com> Reviewed-on: https://review.gerrithub.io/410466 Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Reviewed-by: Karol Latecki <karol.latecki@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
6ff0c0cfb4
commit
dcbcac40be
@ -1,10 +1,6 @@
|
||||
source $SPDK_BUILD_DIR/test/nvmf/common.sh
|
||||
source $MIGRATION_DIR/autotest.config
|
||||
|
||||
MGMT_TARGET_IP="10.102.17.181"
|
||||
MGMT_INITIATOR_IP="10.102.17.180"
|
||||
RDMA_TARGET_IP="10.0.0.1"
|
||||
RDMA_INITIATOR_IP="10.0.0.2"
|
||||
incoming_vm=1
|
||||
target_vm=2
|
||||
incoming_vm_ctrlr=naa.VhostScsi0.$incoming_vm
|
||||
@ -12,6 +8,22 @@ target_vm_ctrlr=naa.VhostScsi0.$target_vm
|
||||
share_dir=$TEST_DIR/share
|
||||
job_file=$MIGRATION_DIR/migration-tc3.job
|
||||
|
||||
if [ -z "$MGMT_TARGET_IP" ]; then
|
||||
error "No IP address of target is given"
|
||||
fi
|
||||
|
||||
if [ -z "$MGMT_INITIATOR_IP" ]; then
|
||||
error "No IP address of initiator is given"
|
||||
fi
|
||||
|
||||
if [ -z "$RDMA_TARGET_IP" ]; then
|
||||
error "No IP address of targets RDMA capable NIC is given"
|
||||
fi
|
||||
|
||||
if [ -z "$RDMA_INITIATOR_IP" ]; then
|
||||
error "No IP address of initiators RDMA capable NIC is given"
|
||||
fi
|
||||
|
||||
function ssh_remote()
|
||||
{
|
||||
local ssh_cmd="ssh -i $SPDK_VHOST_SSH_KEY_FILE \
|
||||
@ -149,8 +161,12 @@ function host_2_create_share()
|
||||
ssh_remote $MGMT_INITIATOR_IP "uname -a"
|
||||
ssh_remote $MGMT_INITIATOR_IP "mkdir -p $share_dir"
|
||||
ssh_remote $MGMT_INITIATOR_IP "mkdir -p $VM_BASE_DIR"
|
||||
ssh_remote $MGMT_INITIATOR_IP "sshfs -o ssh_command=\"ssh -i $SPDK_VHOST_SSH_KEY_FILE\" root@$MGMT_TARGET_IP:$VM_BASE_DIR $VM_BASE_DIR"
|
||||
ssh_remote $MGMT_INITIATOR_IP "sshfs -o ssh_command=\"ssh -i $SPDK_VHOST_SSH_KEY_FILE\" root@$MGMT_TARGET_IP:$share_dir $share_dir"
|
||||
ssh_remote $MGMT_INITIATOR_IP "sshfs -o\
|
||||
ssh_command=\"ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ControlMaster=auto\
|
||||
-i $SPDK_VHOST_SSH_KEY_FILE\" root@$MGMT_TARGET_IP:$VM_BASE_DIR $VM_BASE_DIR"
|
||||
ssh_remote $MGMT_INITIATOR_IP "sshfs -o\
|
||||
ssh_command=\"ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ControlMaster=auto\
|
||||
-i $SPDK_VHOST_SSH_KEY_FILE\" root@$MGMT_TARGET_IP:$share_dir $share_dir"
|
||||
ssh_remote $MGMT_INITIATOR_IP "mkdir -p $share_dir/spdk"
|
||||
ssh_remote $MGMT_INITIATOR_IP "tar -zxf $share_dir/spdk.tar.gz -C $share_dir/spdk --strip-components=1"
|
||||
ssh_remote $MGMT_INITIATOR_IP "cd $share_dir/spdk; make clean; ./configure --with-rdma --enable-debug; make -j40"
|
||||
@ -158,7 +174,9 @@ function host_2_create_share()
|
||||
|
||||
function host_2_start_vhost()
|
||||
{
|
||||
ssh_remote $MGMT_INITIATOR_IP "nohup $share_dir/spdk/test/vhost/migration/migration.sh --test-cases=3b --work-dir=$TEST_DIR --os=$share_dir/migration.qcow2 &>$share_dir/output.log &"
|
||||
ssh_remote $MGMT_INITIATOR_IP "nohup $share_dir/spdk/test/vhost/migration/migration.sh\
|
||||
--test-cases=3b --work-dir=$TEST_DIR --os=$share_dir/migration.qcow2\
|
||||
--rdma-tgt-ip=$RDMA_TARGET_IP &>$share_dir/output.log &"
|
||||
notice "Waiting for remote to be done with vhost & VM setup..."
|
||||
wait_for_remote
|
||||
}
|
||||
|
@ -4,7 +4,6 @@
|
||||
set -m
|
||||
source $MIGRATION_DIR/autotest.config
|
||||
|
||||
RDMA_TARGET_IP="10.0.0.1"
|
||||
incoming_vm=1
|
||||
target_vm=2
|
||||
target_vm_ctrl=naa.VhostScsi0.$target_vm
|
||||
|
@ -11,7 +11,10 @@ declare -A vms_ctrlrs_disks
|
||||
# By default use Guest fio
|
||||
fio_bin=""
|
||||
test_cases=""
|
||||
|
||||
MGMT_TARGET_IP=""
|
||||
MGMT_INITIATOR_IP=""
|
||||
RDMA_TARGET_IP=""
|
||||
RDMA_INITIATOR_IP=""
|
||||
function usage()
|
||||
{
|
||||
[[ ! -z $2 ]] && ( echo "$2"; echo ""; )
|
||||
@ -23,6 +26,10 @@ function usage()
|
||||
echo " --fio-bin=FIO Use specific fio binary (will be uploaded to VM)"
|
||||
echo " --test-cases=TESTS Coma-separated list of tests to run. Implemented test cases are: 1"
|
||||
echo " See test/vhost/test_plan.md for more info."
|
||||
echo " --mgmt-tgt-ip=IP IP address of target."
|
||||
echo " --mgmt-init-ip=IP IP address of initiator."
|
||||
echo " --rdma-tgt-ip=IP IP address of targets rdma capable NIC."
|
||||
echo " --rdma-init-ip=IP IP address of initiators rdma capable NIC."
|
||||
echo "-x set -x for script debug"
|
||||
}
|
||||
|
||||
@ -36,6 +43,10 @@ for param in "$@"; do
|
||||
--os=*) os_image="${param#*=}" ;;
|
||||
--fio-bin=*) fio_bin="${param}" ;;
|
||||
--test-cases=*) test_cases="${param#*=}" ;;
|
||||
--mgmt-tgt-ip=*) MGMT_TARGET_IP="${param#*=}" ;;
|
||||
--mgmt-init-ip=*) MGMT_INITIATOR_IP="${param#*=}" ;;
|
||||
--rdma-tgt-ip=*) RDMA_TARGET_IP="${param#*=}" ;;
|
||||
--rdma-init-ip=*) RDMA_INITIATOR_IP="${param#*=}" ;;
|
||||
-x) set -x ;;
|
||||
-v) SPDK_VHOST_VERBOSE=true ;;
|
||||
*)
|
||||
|
Loading…
Reference in New Issue
Block a user