Code Review
/
releng
/
global-jjb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
(from parent 1:
8af06d1
)
Merge "Fix job cost amazon exception"
author
Andrew Grimberg
<agrimberg@linuxfoundation.org>
Thu, 20 Aug 2020 19:57:49 +0000
(19:57 +0000)
committer
Gerrit Code Review
<gerrit@linuxfoundation.org>
Thu, 20 Aug 2020 19:57:49 +0000
(19:57 +0000)
shell/job-cost.sh
patch
|
blob
|
history
diff --git
a/shell/job-cost.sh
b/shell/job-cost.sh
index
cb5f1a5
..
595b342
100644
(file)
--- a/
shell/job-cost.sh
+++ b/
shell/job-cost.sh
@@
-16,7
+16,8
@@
set -euf -o pipefail
source ~/lf-env.sh
# AWS job cost not supported, exit
-if grep -qi amazon /sys/devices/virtual/dmi/id/bios_vendor ; then
+cloudtype="$(jq -r .v1.datasource /run/cloud-init/result.json)"
+if [[ $cloudtype == "DataSourceEc2Local" ]]; then
echo "INFO: Not able to calculate job cost on AWS"
exit 0
fi