diff --git a/test/iscsi_tgt/nvme_remote/fio_remote_nvme.sh b/test/iscsi_tgt/nvme_remote/fio_remote_nvme.sh index 5e08932ce..0f761a2e9 100755 --- a/test/iscsi_tgt/nvme_remote/fio_remote_nvme.sh +++ b/test/iscsi_tgt/nvme_remote/fio_remote_nvme.sh @@ -73,7 +73,11 @@ $rpc_py set_nvmf_target_options -u 8192 -p 4 $rpc_py start_subsystem_init echo "NVMf target has started." bdevs=$($rpc_py construct_malloc_bdev 64 512) -$rpc_py construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode1 "trtype:RDMA traddr:$NVMF_FIRST_TARGET_IP trsvcid:4420" "" -a -s SPDK00000000000001 -n "$bdevs" +$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 +$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s 4420 +for bdev in $bdevs; do + $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 $bdev +done echo "NVMf subsystem created." timing_enter start_iscsi_tgt diff --git a/test/json_config/common.sh b/test/json_config/common.sh index 5d98a0ee8..066060596 100644 --- a/test/json_config/common.sh +++ b/test/json_config/common.sh @@ -171,10 +171,11 @@ function create_nvmf_subsystem_config() { bdevs="$($rpc_py construct_malloc_bdev 64 512) " bdevs+="$($rpc_py construct_malloc_bdev 64 512)" - $rpc_py construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode1 '' '' -a -s SPDK00000000000001 -n "$bdevs" + $rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 + for bdev in $bdevs; do + $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 $bdev + done $rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t RDMA -a $NVMF_FIRST_TARGET_IP -s "$NVMF_PORT" - $rpc_py nvmf_subsystem_add_host nqn.2016-06.io.spdk:cnode1 nqn.2016-06.io.spdk:host1 - $rpc_py nvmf_subsystem_allow_any_host nqn.2016-06.io.spdk:cnode1 } function clear_nvmf_subsystem_config() { diff --git a/test/nvmf/bdev_io_wait/bdev_io_wait.sh b/test/nvmf/bdev_io_wait/bdev_io_wait.sh index 817e63fb8..326e02b43 100755 --- a/test/nvmf/bdev_io_wait/bdev_io_wait.sh +++ b/test/nvmf/bdev_io_wait/bdev_io_wait.sh @@ -42,7 +42,11 @@ modprobe -v nvme-rdma bdevs="$bdevs $($rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE)" -$rpc_py construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode1 "trtype:RDMA traddr:$NVMF_FIRST_TARGET_IP trsvcid:4420" '' -a -s SPDK00000000000001 -n "$bdevs" +$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 +for bdev in $bdevs; do + $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 $bdev +done +$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s 4420 echo "[Nvme]" > $testdir/bdevperf.conf echo " TransportID \"trtype:RDMA adrfam:IPv4 subnqn:nqn.2016-06.io.spdk:cnode1 traddr:$NVMF_FIRST_TARGET_IP trsvcid:4420\" Nvme0" >> $testdir/bdevperf.conf diff --git a/test/nvmf/discovery/discovery.sh b/test/nvmf/discovery/discovery.sh index eb3c340c3..f6f0c3142 100755 --- a/test/nvmf/discovery/discovery.sh +++ b/test/nvmf/discovery/discovery.sh @@ -46,10 +46,11 @@ null_bdevs+="$($rpc_py construct_null_bdev Null1 $NULL_BDEV_SIZE $NULL_BLOCK_SIZ modprobe -v nvme-rdma -$rpc_py construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode1 "trtype:RDMA traddr:$NVMF_FIRST_TARGET_IP trsvcid:4420" "" -a -s SPDK00000000000001 +$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 for null_bdev in $null_bdevs; do $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 $null_bdev done +$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s 4420 nvme discover -t rdma -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT diff --git a/test/nvmf/filesystem/filesystem.sh b/test/nvmf/filesystem/filesystem.sh index 982b04155..3cce01074 100755 --- a/test/nvmf/filesystem/filesystem.sh +++ b/test/nvmf/filesystem/filesystem.sh @@ -41,7 +41,11 @@ for incapsule in 0 4096; do modprobe -v nvme-rdma - $rpc_py construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode1 "trtype:RDMA traddr:$NVMF_FIRST_TARGET_IP trsvcid:4420" "" -a -s SPDK00000000000001 -n "$bdevs" + $rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 + for bdev in $bdevs; do + $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 $bdev + done + $rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s 4420 nvme connect -t rdma -n "nqn.2016-06.io.spdk:cnode1" -a "$NVMF_FIRST_TARGET_IP" -s "$NVMF_PORT" diff --git a/test/nvmf/fio/fio.sh b/test/nvmf/fio/fio.sh index 78730efe7..254dab4d5 100755 --- a/test/nvmf/fio/fio.sh +++ b/test/nvmf/fio/fio.sh @@ -41,11 +41,11 @@ malloc_bdevs+="$($rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_S modprobe -v nvme-rdma -$rpc_py construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode1 "trtype:RDMA traddr:$NVMF_FIRST_TARGET_IP trsvcid:4420" "" -a -s SPDK00000000000001 - +$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 for malloc_bdev in $malloc_bdevs; do $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 "$malloc_bdev" done +$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s 4420 nvme connect -t rdma -n "nqn.2016-06.io.spdk:cnode1" -a "$NVMF_FIRST_TARGET_IP" -s "$NVMF_PORT" diff --git a/test/nvmf/host/aer.sh b/test/nvmf/host/aer.sh index 98fabdace..175bb28d9 100755 --- a/test/nvmf/host/aer.sh +++ b/test/nvmf/host/aer.sh @@ -32,7 +32,10 @@ timing_exit start_nvmf_tgt modprobe -v nvme-rdma $rpc_py construct_malloc_bdev 64 512 --name Malloc0 -$rpc_py construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode1 "trtype:RDMA traddr:$NVMF_FIRST_TARGET_IP trsvcid:$NVMF_PORT" '' -a -s SPDK00000000000001 -n Malloc0 -m 2 +$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 -m 2 +$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Malloc0 +$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT + $rpc_py get_nvmf_subsystems # TODO: this aer test tries to invoke an AER completion by setting the temperature diff --git a/test/nvmf/host/bdevperf.sh b/test/nvmf/host/bdevperf.sh index 0c970101b..f17113066 100755 --- a/test/nvmf/host/bdevperf.sh +++ b/test/nvmf/host/bdevperf.sh @@ -34,7 +34,11 @@ timing_exit start_nvmf_tgt bdevs="$bdevs $($rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE)" -$rpc_py construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode1 "trtype:RDMA traddr:$NVMF_FIRST_TARGET_IP trsvcid:4420" '' -a -s SPDK00000000000001 -n "$bdevs" +$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 +for bdev in $bdevs; do + $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 $bdev +done +$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s 4420 echo "[Nvme]" > $testdir/bdevperf.conf echo " TransportID \"trtype:RDMA adrfam:IPv4 subnqn:nqn.2016-06.io.spdk:cnode1 traddr:$NVMF_FIRST_TARGET_IP trsvcid:4420\" Nvme0" >> $testdir/bdevperf.conf diff --git a/test/nvmf/host/fio.sh b/test/nvmf/host/fio.sh index e4391fddb..2a772636c 100755 --- a/test/nvmf/host/fio.sh +++ b/test/nvmf/host/fio.sh @@ -36,7 +36,11 @@ $rpc_py start_subsystem_init timing_exit start_nvmf_tgt bdevs="$bdevs $($rpc_py construct_malloc_bdev 64 512)" -$rpc_py construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode1 "trtype:RDMA traddr:$NVMF_FIRST_TARGET_IP trsvcid:4420" '' -a -s SPDK00000000000001 -n "$bdevs" +$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 +for bdev in $bdevs; do + $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 $bdev +done +$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s 4420 PLUGIN_DIR=$rootdir/examples/nvme/fio_plugin @@ -52,7 +56,11 @@ if [ $RUN_NIGHTLY -eq 1 ]; then ls_guid=$($rpc_py construct_lvol_store Nvme0n1 lvs_0) get_lvs_free_mb $ls_guid lb_guid=$($rpc_py construct_lvol_bdev -u $ls_guid lbd_0 $free_mb) - $rpc_py construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode2 "trtype:RDMA traddr:$NVMF_FIRST_TARGET_IP trsvcid:4420" "" -a -s SPDK00000000000002 -n "$lb_guid" + $rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode2 -a -s SPDK00000000000001 + for bdev in $lb_guid; do + $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode2 $bdev + done + $rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode2 -t rdma -a $NVMF_FIRST_TARGET_IP -s 4420 LD_PRELOAD=$PLUGIN_DIR/fio_plugin /usr/src/fio/fio $PLUGIN_DIR/example_config.fio --filename="trtype=RDMA adrfam=IPv4 \ traddr=$NVMF_FIRST_TARGET_IP trsvcid=4420 ns=1" $rpc_py delete_nvmf_subsystem nqn.2016-06.io.spdk:cnode2 @@ -61,7 +69,11 @@ if [ $RUN_NIGHTLY -eq 1 ]; then ls_nested_guid=$($rpc_py construct_lvol_store $lb_guid lvs_n_0) get_lvs_free_mb $ls_nested_guid lb_nested_guid=$($rpc_py construct_lvol_bdev -u $ls_nested_guid lbd_nest_0 $free_mb) - $rpc_py construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode3 "trtype:RDMA traddr:$NVMF_FIRST_TARGET_IP trsvcid:4420" "" -a -s SPDK00000000000003 -n "$lb_nested_guid" + $rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode3 -a -s SPDK00000000000001 + for bdev in $lb_nested_guid; do + $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode3 $bdev + done + $rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode3 -t rdma -a $NVMF_FIRST_TARGET_IP -s 4420 LD_PRELOAD=$PLUGIN_DIR/fio_plugin /usr/src/fio/fio $PLUGIN_DIR/example_config.fio --filename="trtype=RDMA adrfam=IPv4 \ traddr=$NVMF_FIRST_TARGET_IP trsvcid=4420 ns=1" $rpc_py delete_nvmf_subsystem nqn.2016-06.io.spdk:cnode3 diff --git a/test/nvmf/host/identify.sh b/test/nvmf/host/identify.sh index c2ac51a84..80209e57f 100755 --- a/test/nvmf/host/identify.sh +++ b/test/nvmf/host/identify.sh @@ -33,9 +33,7 @@ timing_exit start_nvmf_tgt bdevs="$bdevs $($rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE)" -$rpc_py construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode1 '' '' -a -s SPDK00000000000001 -$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t RDMA -a $NVMF_FIRST_TARGET_IP -s 4420 - +$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 for bdev in $bdevs; do # NOTE: This will assign the same NGUID and EUI64 to all bdevs, # but currently we only have one (see above), so this is OK. @@ -43,6 +41,7 @@ for bdev in $bdevs; do --nguid "ABCDEF0123456789ABCDEF0123456789" \ --eui64 "ABCDEF0123456789" done +$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t RDMA -a $NVMF_FIRST_TARGET_IP -s 4420 $rpc_py get_nvmf_subsystems diff --git a/test/nvmf/host/perf.sh b/test/nvmf/host/perf.sh index 89da45fe9..37a48f3d9 100755 --- a/test/nvmf/host/perf.sh +++ b/test/nvmf/host/perf.sh @@ -40,7 +40,11 @@ if [ -n "$local_nvme_trid" ]; then bdevs="$bdevs Nvme0n1" fi -$rpc_py construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode1 "trtype:RDMA traddr:$NVMF_FIRST_TARGET_IP trsvcid:4420" '' -a -s SPDK00000000000001 -n "$bdevs" +$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 +for bdev in $bdevs; do + $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 $bdev +done +$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s 4420 # Test multi-process access to local NVMe device if [ -n "$local_nvme_trid" ]; then @@ -62,8 +66,11 @@ if [ $RUN_NIGHTLY -eq 1 ]; then ls_nested_guid=$($rpc_py construct_lvol_store $lb_guid lvs_n_0) get_lvs_free_mb $ls_nested_guid lb_nested_guid=$($rpc_py construct_lvol_bdev -u $ls_nested_guid lbd_nest_0 $free_mb) - $rpc_py construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode1 "trtype:RDMA traddr:$NVMF_FIRST_TARGET_IP trsvcid:4420" "" -a -s SPDK00000000000001 -n "$lb_nested_guid" - + $rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 + for bdev in $lb_nested_guid; do + $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 $bdev + done + $rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s 4420 # Test perf as host with different io_size and qd_depth in nightly qd_depth=("1" "128") io_size=("512" "131072") diff --git a/test/nvmf/lvol/nvmf_lvol.sh b/test/nvmf/lvol/nvmf_lvol.sh index b69d93a68..82f89ce92 100755 --- a/test/nvmf/lvol/nvmf_lvol.sh +++ b/test/nvmf/lvol/nvmf_lvol.sh @@ -74,7 +74,12 @@ for i in `seq 1 $SUBSYS_NR`; do lvol_bdevs+=("$lb_name") ns_bdevs+="$lb_name " done - $rpc_py construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode$i "trtype:RDMA traddr:$NVMF_FIRST_TARGET_IP trsvcid:$NVMF_PORT" '' -a -s SPDK$i -n "$ns_bdevs" + + $rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode$i -a -s SPDK$i + for bdev in $ns_bdevs; do + $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode$i $bdev + done + $rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode$i -t rdma -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT done for i in `seq 1 $SUBSYS_NR`; do diff --git a/test/nvmf/multiconnection/multiconnection.sh b/test/nvmf/multiconnection/multiconnection.sh index d5781d96b..702df79bf 100755 --- a/test/nvmf/multiconnection/multiconnection.sh +++ b/test/nvmf/multiconnection/multiconnection.sh @@ -50,7 +50,11 @@ modprobe -v nvme-rdma for i in `seq 1 $NVMF_SUBSYS` do bdevs="$($rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE)" - $rpc_py construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode${i} "trtype:RDMA traddr:$NVMF_FIRST_TARGET_IP trsvcid:$NVMF_PORT" '' -a -s SPDK${i} -n "$bdevs" + $rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode$i -a -s SPDK$i + for bdev in $bdevs; do + $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode$i $bdev + done + $rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode$i -t rdma -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT done for i in `seq 1 $NVMF_SUBSYS`; do diff --git a/test/nvmf/nmic/nmic.sh b/test/nvmf/nmic/nmic.sh index b6def9eda..3b952e0f3 100755 --- a/test/nvmf/nmic/nmic.sh +++ b/test/nvmf/nmic/nmic.sh @@ -39,20 +39,28 @@ timing_exit start_nvmf_tgt # Create subsystems bdevs="$($rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE)" -$rpc_py construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode1 "trtype:RDMA traddr:$NVMF_FIRST_TARGET_IP trsvcid:$NVMF_PORT" '' -a -s SPDK1 -n "$bdevs" +$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK1 +for bdev in $bdevs; do + $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 $bdev +done +$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t RDMA -a $NVMF_FIRST_TARGET_IP -s "$NVMF_PORT" echo "test case1: single bdev can't be used in multiple subsystems" set +e -$rpc_py construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode2 "trtype:RDMA traddr:$NVMF_FIRST_TARGET_IP trsvcid:$NVMF_PORT" '' -a -s SPDK2 -n "$bdevs" -nmic_status=$? +$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode2 -a -s SPDK2 +$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode2 -t RDMA -a $NVMF_FIRST_TARGET_IP -s "$NVMF_PORT" +for bdev in $bdevs; do + $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode2 $bdev + nmic_status=$? -if [ $nmic_status -eq 0 ]; then - echo " constructing nvmf subsystem passed - failure expected." - killprocess $pid - exit 1 -else - echo " constructing nvmf subsystem failed - expected result." -fi + if [ $nmic_status -eq 0 ]; then + echo " Adding namespace passed - failure expected." + killprocess $pid + exit 1 + else + echo " Adding namespace failed - expected result." + fi +done set -e modprobe -v nvme-rdma diff --git a/test/nvmf/nvme_cli/nvme_cli.sh b/test/nvmf/nvme_cli/nvme_cli.sh index 8a72f6434..87c5d2219 100755 --- a/test/nvmf/nvme_cli/nvme_cli.sh +++ b/test/nvmf/nvme_cli/nvme_cli.sh @@ -47,8 +47,11 @@ bdevs+="$($rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE)" modprobe -v nvme-rdma -$rpc_py construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode1 '' '' -a -s SPDK00000000000001 -n "$bdevs" -$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t RDMA -a $NVMF_FIRST_TARGET_IP -s "$NVMF_PORT" +$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 +for bdev in $bdevs; do + $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 $bdev +done +$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT nvme connect -t rdma -n "nqn.2016-06.io.spdk:cnode1" -a "$NVMF_FIRST_TARGET_IP" -s "$NVMF_PORT" diff --git a/test/nvmf/rpc/rpc.sh b/test/nvmf/rpc/rpc.sh index 690261dee..db743ac3c 100755 --- a/test/nvmf/rpc/rpc.sh +++ b/test/nvmf/rpc/rpc.sh @@ -46,7 +46,7 @@ MALLOC_BLOCK_SIZE=512 bdevs="$bdevs $($rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE)" # Disallow host NQN and make sure connect fails -$rpc_py construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode1 '' '' -s SPDK00000000000001 +$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 for bdev in $bdevs; do $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 $bdev done @@ -81,7 +81,7 @@ do j=0 for bdev in $bdevs; do let j=j+1 - $rpc_py construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode$j '' '' -s SPDK00000000000001 + $rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode$j -s SPDK00000000000001 $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode$j $bdev -n 5 $rpc_py nvmf_subsystem_allow_any_host nqn.2016-06.io.spdk:cnode$j nvme connect -t rdma -n nqn.2016-06.io.spdk:cnode$j -a "$NVMF_FIRST_TARGET_IP" -s "$NVMF_PORT" @@ -116,7 +116,7 @@ do j=0 for bdev in $bdevs; do let j=j+1 - $rpc_py construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode$j '' '' -s SPDK00000000000001 + $rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode$j -s SPDK00000000000001 $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode$j $bdev $rpc_py nvmf_subsystem_allow_any_host nqn.2016-06.io.spdk:cnode$j done diff --git a/test/nvmf/shutdown/shutdown.sh b/test/nvmf/shutdown/shutdown.sh index f4a95090c..0c4afbc29 100755 --- a/test/nvmf/shutdown/shutdown.sh +++ b/test/nvmf/shutdown/shutdown.sh @@ -48,7 +48,11 @@ fi for i in `seq 1 $num_subsystems` do bdevs="$($rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE)" - $rpc_py construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode${i} "trtype:RDMA traddr:$NVMF_FIRST_TARGET_IP trsvcid:$NVMF_PORT" '' -a -s SPDK${i} -n "$bdevs" + $rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode$i -a -s SPDK$i + for bdev in $bdevs; do + $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode$i $bdev + done + $rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode$i -t rdma -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT done modprobe -v nvme-rdma diff --git a/test/vhost/migration/migration-tc2.sh b/test/vhost/migration/migration-tc2.sh index 0f9977079..e2c27a4b5 100644 --- a/test/vhost/migration/migration-tc2.sh +++ b/test/vhost/migration/migration-tc2.sh @@ -118,8 +118,9 @@ function migration_tc2_configure_vhost() notice "Configuring nvmf_tgt, vhost devices & controllers via RPC ..." # Construct shared bdevs and controllers - $rpc_nvmf construct_nvmf_subsystem nqn.2016-06.io.spdk:cnode1 \ - "trtype:RDMA traddr:$nvmf_target_ip trsvcid:4420" "" -a -s SPDK00000000000001 -n Nvme0n1 + $rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 + $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Nvme0n1 + $rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $nvmf_target_ip -s 4420 $rpc_0 construct_nvme_bdev -b Nvme0 -t rdma -f ipv4 -a $nvmf_target_ip -s 4420 -n "nqn.2016-06.io.spdk:cnode1" $rpc_0 construct_vhost_scsi_controller $incoming_vm_ctrlr diff --git a/test/vhost/migration/migration-tc3a.sh b/test/vhost/migration/migration-tc3a.sh index 9795e3b8a..c66f6c7f5 100644 --- a/test/vhost/migration/migration-tc3a.sh +++ b/test/vhost/migration/migration-tc3a.sh @@ -109,8 +109,9 @@ function host1_start_nvmf() $rpc_nvmf start_subsystem_init $SPDK_BUILD_DIR/scripts/gen_nvme.sh --json | $rpc_nvmf load_subsystem_config - $rpc_nvmf construct_nvmf_subsystem nqn.2018-02.io.spdk:cnode1 \ - "trtype:RDMA traddr:$RDMA_TARGET_IP trsvcid:4420" "" -a -s SPDK01 -n Nvme0n1 + $rpc_py nvmf_subsystem_create nqn.2018-02.io.spdk:cnode1 -a -s SPDK01 + $rpc_py nvmf_subsystem_add_ns nqn.2018-02.io.spdk:cnode1 Nvme0n1 + $rpc_py nvmf_subsystem_add_listener nqn.2018-02.io.spdk:cnode1 -t rdma -a $RDMA_TARGET_IP -s 4420 } function host1_start_vhost()