diff options
author | Vratko Polak <vrpolak@cisco.com> | 2018-09-12 13:16:22 +0200 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2018-09-12 12:44:09 +0000 |
commit | 6d105d22e67c3bedf54e6bbb904cb8eb4f05e5f6 (patch) | |
tree | 18fbf278e02260052d259b0fd2e539d86e499a94 /resources/libraries/bash/function | |
parent | 82e66d4caaede668b311f3885c8f590a8da9c032 (diff) |
Fix: trap for unreserve before cleanup
Change-Id: I978a056ffdfd6daa00a0a1c587774b4a7204b434
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries/bash/function')
-rw-r--r-- | resources/libraries/bash/function/common.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh index f08d7f2818..f07997dfc3 100644 --- a/resources/libraries/bash/function/common.sh +++ b/resources/libraries/bash/function/common.sh @@ -303,9 +303,6 @@ function reserve_testbed () { if [[ "${result}" == "0" ]]; then WORKING_TOPOLOGY="${topo}" echo "Reserved: ${WORKING_TOPOLOGY}" - python "${PYTHON_SCRIPTS_DIR}/topo_cleanup.py" -t "${topo}" || { - die "Testbed cleanup failed." - } trap "untrap_and_unreserve_testbed" EXIT || { message="TRAP ATTEMPT AND UNRESERVE FAILED, FIX MANUALLY." untrap_and_unreserve_testbed "${message}" || { @@ -313,6 +310,9 @@ function reserve_testbed () { } die "Trap attempt failed, unreserve succeeded. Aborting." } + python "${PYTHON_SCRIPTS_DIR}/topo_cleanup.py" -t "${topo}" || { + die "Testbed cleanup failed." + } break fi done |