test/iscsi: run cleanup once before running the tests
Run iscsicleanup once before running the tests. This is to ensure we delete any stale entries or files if they were not removed properly in previous test runs. Fixes #1311 Signed-off-by: Karol Latecki <karol.latecki@intel.com> Change-Id: Idb415adddfaa7cbb443377a292fae357c1707e79 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1539 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
99cff8350b
commit
dbb84dd5d6
@ -578,6 +578,7 @@ function iscsicleanup() {
|
|||||||
echo "Cleaning up iSCSI connection"
|
echo "Cleaning up iSCSI connection"
|
||||||
iscsiadm -m node --logout || true
|
iscsiadm -m node --logout || true
|
||||||
iscsiadm -m node -o delete || true
|
iscsiadm -m node -o delete || true
|
||||||
|
rm -rf /var/lib/iscsi/nodes/*
|
||||||
}
|
}
|
||||||
|
|
||||||
function stop_iscsi_service() {
|
function stop_iscsi_service() {
|
||||||
|
@ -17,6 +17,10 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Run cleanup once to make sure we remove any stale iscsiadm
|
||||||
|
# entries if they were missed in previous runs
|
||||||
|
iscsicleanup
|
||||||
|
|
||||||
# Network configuration
|
# Network configuration
|
||||||
create_veth_interfaces $TEST_TYPE
|
create_veth_interfaces $TEST_TYPE
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user