Code Review
/
csit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
FIX: use correct NIC for mr-daily-master job
[csit.git]
/
resources
/
libraries
/
bash
/
function
/
common.sh
diff --git
a/resources/libraries/bash/function/common.sh
b/resources/libraries/bash/function/common.sh
index
b38cd52
..
c1593b2
100644
(file)
--- a/
resources/libraries/bash/function/common.sh
+++ b/
resources/libraries/bash/function/common.sh
@@
-576,6
+576,7
@@
function reserve_and_cleanup_testbed () {
# - WORKING_TOPOLOGY - Path to topology yaml file of the reserved testbed.
# Functions called:
# - die - Print to stderr and exit.
# - WORKING_TOPOLOGY - Path to topology yaml file of the reserved testbed.
# Functions called:
# - die - Print to stderr and exit.
+ # - ansible_hosts - Perform an action using ansible, see ansible.sh
# Traps registered:
# - EXIT - Calls cancel_all for ${WORKING_TOPOLOGY}.
# Traps registered:
# - EXIT - Calls cancel_all for ${WORKING_TOPOLOGY}.
@@
-604,7
+605,7
@@
function reserve_and_cleanup_testbed () {
}
# Cleanup check.
set +e
}
# Cleanup check.
set +e
- cleanup_topo
+ ansible_hosts "cleanup"
result="$?"
set -e
if [[ "${result}" == "0" ]]; then
result="$?"
set -e
if [[ "${result}" == "0" ]]; then
@@
-756,6
+757,12
@@
function select_tags () {
*"3n-tsh"*)
default_nic="nic_intel-x520-da2"
;;
*"3n-tsh"*)
default_nic="nic_intel-x520-da2"
;;
+ *"3n-skx"* | *"2n-skx"* | *"2n-clx"*)
+ default_nic="nic_intel-xxv710"
+ ;;
+ *"3n-hsw"* | *"mrr-daily-master")
+ default_nic="nic_intel-xl710"
+ ;;
*)
default_nic="nic_intel-x710"
;;
*)
default_nic="nic_intel-x710"
;;
@@
-1025,6
+1032,7
@@
function untrap_and_unreserve_testbed () {
# - EXIT - Failure to untrap is reported, but ignored otherwise.
# Functions called:
# - die - Print to stderr and exit.
# - EXIT - Failure to untrap is reported, but ignored otherwise.
# Functions called:
# - die - Print to stderr and exit.
+ # - ansible_hosts - Perform an action using ansible, see ansible.sh
set -xo pipefail
set +eu # We do not want to exit early in a "teardown" function.
set -xo pipefail
set +eu # We do not want to exit early in a "teardown" function.
@@
-1034,7
+1042,7
@@
function untrap_and_unreserve_testbed () {
set -eu
warn "Testbed looks unreserved already. Trap removal failed before?"
else
set -eu
warn "Testbed looks unreserved already. Trap removal failed before?"
else
-
cleanup_topo
|| true
+
ansible_hosts "cleanup"
|| true
python "${PYTHON_SCRIPTS_DIR}/topo_reservation.py" -c -t "${wt}" || {
die "${1:-FAILED TO UNRESERVE, FIX MANUALLY.}" 2
}
python "${PYTHON_SCRIPTS_DIR}/topo_reservation.py" -c -t "${wt}" || {
die "${1:-FAILED TO UNRESERVE, FIX MANUALLY.}" 2
}