Skip to content

Commit

Permalink
Add KVM tests to healthcheck
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle Harding <kyle@balena.io>
  • Loading branch information
klutchell committed Dec 11, 2023
1 parent e9ac1be commit edc10a4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions test/healthcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ if command -v ip >/dev/null 2>&1; then
ip route
fi

# nested virtualization is not available on aarch64
if [ -r /dev/kvm ]; then
ls -l /dev/kvm
test -w /dev/kvm
fi

if which kvm-ok > /dev/null; then
kvm-ok
fi

if command -v npm >/dev/null 2>&1; then
npm ping
fi
Expand Down
4 changes: 2 additions & 2 deletions test/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ubuntu | debian)

# install packages required by healthchecks
apt-get update
apt-get install -y ca-certificates curl gnupg iproute2 iptables iputils-ping util-linux
apt-get install -y ca-certificates cpu-checker curl gnupg iproute2 iptables iputils-ping kmod util-linux

# Add Docker's official GPG key
install -m 0755 -d /etc/apt/keyrings
Expand Down Expand Up @@ -53,7 +53,7 @@ ubuntu | debian)
;;
alpine)
# install packages required by healthchecks
apk add --no-cache bash ca-certificates curl docker iproute2 iputils-ping lsblk util-linux
apk add --no-cache bash ca-certificates curl docker iproute2 iputils-ping kmod lsblk util-linux

# create nonroot user for healthchecks
adduser --disabled-password --gecos "" nonroot
Expand Down

0 comments on commit edc10a4

Please sign in to comment.