metrics: scaling: check we have bc installed

We now use `bc` for some of the stats calculations. Ensure it
is installed, or we silently generate bad field data.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
This commit is contained in:
Graham Whaley
2019-08-23 10:53:46 +01:00
committed by David Lyle
parent 6a7eb8bbc9
commit 6d5c782fce
+4
View File
@@ -199,6 +199,10 @@ EOF
init() {
info "Initialising"
local cmds=("bc")
check_cmds "${cmds[@]}"
info "Checking k8s accessible"
local worked=$( kubectl get nodes > /dev/null 2>&1 && echo $? || echo $? )
if [ "$worked" != 0 ]; then