Files

20 lines
670 B
Bash
Raw Permalink Normal View History

#!/usr/bin/env bash
# How many concurrent `docker exec` sessions does this host tolerate?
# The Phew SLA checker's 5-way concurrency test failed with
# "No such exec instance" + "failed to open stdin fifo", which points at an
# exec-session ceiling rather than at the checker.
set -uo pipefail
C=${1:-phew_container_team1}
N=${2:-8}
echo "container: $C"
echo "--- $N concurrent trivial execs ---"
fail=0
for i in $(seq 1 "$N"); do
( out=$(docker exec "$C" true 2>&1); rc=$?
if [ $rc -ne 0 ]; then echo " exec$i FAILED: $out"; fi ) &
done
wait
echo "--- done ---"
echo "dockerd max concurrent execs:"
docker info 2>/dev/null | grep -iE 'exec|containerd' | head -3