mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-04-11 22:34:14 +00:00
Move to the development track of `containerd` not the legacy 0.2 branch. The commands have changed a bit. This does increase the image size as we are bundling the Docker copy and our copy, and the new one is larger as it is growing features. Hopefully Docker will shrink eventually. Also we may replace `ctr` with a library. Fix #1029 Signed-off-by: Justin Cormack <justin.cormack@docker.com>
48 lines
1.8 KiB
Bash
Executable File
48 lines
1.8 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
EXIT_STATUS=0
|
|
|
|
fail()
|
|
{
|
|
printf "✗ $1"
|
|
EXIT_STATUS=1
|
|
}
|
|
|
|
ok()
|
|
{
|
|
printf "✓ $1"
|
|
}
|
|
|
|
printf '\n'
|
|
DEV="$(find /dev -maxdepth 1 -type b ! -name 'loop*' | grep -v '[0-9]$' | sed 's@.*/dev/@@' | head -1 )"
|
|
[ $? -eq 0 ] && ok "Drive found: $DEV\n" || fail "No drive found\n"
|
|
DEV=$(mount | grep '/dev/.* on /var type')
|
|
[ $? -eq 0 ] && ok "Drive mounted: $DEV\n" || fail "No drive mounted\n"
|
|
INET=$(ifconfig eth0 2> /dev/null | grep 'inet addr')
|
|
[ $? -eq 0 ] && ok "Network connected: $INET\n" || fail "No network connection\n"
|
|
if [ "$(mobyplatform)" = "mac" ]
|
|
then
|
|
FUSE=$(ps -eo args | grep '^/sbin/transfused')
|
|
[ $? -eq 0 ] && ok "Process transfused running\n" || fail "No transfused process\n"
|
|
fi
|
|
if [ "$(mobyplatform)" = "windows" ]
|
|
then
|
|
TAPVS=$(ps -eo args | grep '^/sbin/tap-vsockd')
|
|
[ $? -eq 0 ] && ok "Process tap-vsockd running\n" || fail "No tap-vsockd process\n"
|
|
fi
|
|
DOCKER=$(ps -eo args | grep '^dockerd')
|
|
[ $? -eq 0 ] && ok "Process dockerd running: $DOCKER\n" || fail "No dockerd process\n"
|
|
CONTAINERD=$(ps -eo args | grep '^docker-containerd')
|
|
[ $? -eq 0 ] && ok "Process containerd running: $CONTAINERD\n" || fail "No containerd process\n"
|
|
DOCKERPS=$(docker ps 2>&1)
|
|
DOCKERDV=$(docker version --format '{{.Server.Version}}')
|
|
[ $? -eq 0 ] && ok "Docker daemon working: ${DOCKERDV}\n" || fail "Docker ps failed: $DOCKERPS\n"
|
|
DIAGNOSTICS=$(ps -eo args | grep '^/usr/bin/diagnostics-server')
|
|
[ $? -eq 0 ] && ok "Diagnostics server running: $DIAGNOSTICS\n" || fail "No diagnostics server\n"
|
|
CONTAINERD=$(ps -eo args | grep '^/usr/bin/containerd')
|
|
[ $? -eq 0 ] && ok "System containerd server running: $CONTAINERD\n" || fail "No containerd server\n"
|
|
CONTAINERPS=$(ctr list 2>&1)
|
|
[ $? -eq 0 ] && ok "System containerd working\n" || fail "containerd failed: $CONTAINERPS\n"
|
|
|
|
exit $EXIT_STATUS
|