summaryrefslogtreecommitdiffstats
path: root/kud/tests/qat.sh
diff options
context:
space:
mode:
authorTodd Malsbary <todd.malsbary@intel.com>2020-12-02 16:09:36 -0800
committerTodd Malsbary <todd.malsbary@intel.com>2020-12-07 16:41:54 -0800
commitd3b0887248f10248d4a87a91f918984761f95599 (patch)
tree7fd1e5aace04f3e940c56d66ff2d47be10dce5ef /kud/tests/qat.sh
parent7e06fbaa3d1293ca9b25aeb7ea7cb7be2179e30a (diff)
Fix QAT addon deploy and test
Note that as mentioned in install_qat.sh, the kernel command line must include "intel_iommu=on iommu=pt" for the deploy and test to succeed. The underlying issue is that the playbook was expecting to be run on the same host it executed on and was looking for files in the wrong places. Issue-ID: MULTICLOUD-1261 Signed-off-by: Todd Malsbary <todd.malsbary@intel.com> Change-Id: I5f59b9147f34f077fcdc63d7fc5f80b56977054c
Diffstat (limited to 'kud/tests/qat.sh')
-rwxr-xr-xkud/tests/qat.sh15
1 files changed, 5 insertions, 10 deletions
diff --git a/kud/tests/qat.sh b/kud/tests/qat.sh
index 2f8d212a..8365f700 100755
--- a/kud/tests/qat.sh
+++ b/kud/tests/qat.sh
@@ -10,16 +10,13 @@
set -o pipefail
-qat_device=$( for i in 0434 0435 37c8 6f54 19e2; \
- do lspci -d 8086:$i -m; done |\
- grep -i "Quick*" | head -n 1 | cut -d " " -f 5 )
-#Checking if the QAT device is on the node
-if [ -z "$qat_device" ]; then
- echo "False. This test case cannot run. Qat device unavailable."
+qat_capable_nodes=$(kubectl get nodes -o json | jq -r '.items[] | select(.status.capacity."qat.intel.com/cy2_dc2">="1") | .metadata.name')
+if [ -z "$qat_capable_nodes" ]; then
+ echo "This test case cannot run. QAT device unavailable."
QAT_ENABLED=False
exit 0
else
- echo "True. Can run QAT on this device."
+ echo "Can run QAT on this cluster."
QAT_ENABLED=True
fi
@@ -78,9 +75,7 @@ kubectl create -f $HOME/$pod_name.yaml --validate=false
allocated_node_resource=$(kubectl describe node | grep "qat.intel.com" | tail -n1 |awk '{print $(NF)}')
echo "The allocated resource of the node is: " $allocated_node_resource
-adf_ctl restart
-systemctl restart qat_service
-kubectl exec -it pod-case-01 -- openssl engine -c -t qat
+kubectl exec pod-case-01 -- openssl engine -c -t qat
kubectl delete pod $pod_name --now
echo "Test complete."