Added support for Swarm Service Driller (ssd)

Signed-off-by: Jim Carroll <jim.carroll@docker.com>
This commit is contained in:
Jim Carroll 2018-02-14 14:30:03 -06:00
parent 3321709a62
commit a478edc819
1 changed files with 20 additions and 0 deletions

View File

@ -1,5 +1,15 @@
#!/usr/bin/env bash
while getopts ":s" opt; do
case $opt in
s)
SSD="true"
;;
esac
done
SSD="${SSD:-false}"
# Required tools
DOCKER="${DOCKER:-docker}"
NSENTER="${NSENTER:-nsenter}"
@ -7,6 +17,7 @@ BRIDGE="${BRIDGE:-bridge}"
IPTABLES="${IPTABLES:-iptables}"
IPVSADM="${IPVSADM:-ipvsadm}"
IP="${IP:-ip}"
SSDBIN="${SSDBIN:-ssd}"
networks=0
containers=0
@ -101,6 +112,15 @@ while read containerID status; do
printf "\n"
done < <(${DOCKER} container ls -a --format '{{.ID}} {{.Status}}' |cut -d' ' -f1,2)
if [ "true" == ${SSD} ] ; then
echo "" ; echo "#### SSD control-plane and datapath consistency check on a node ####"
for netName in $(docker network ls -f driver=overlay --format "{{.Name}}") ; do
echo "## $netName ##"
${SSDBIN} $netName
echo ""
done
fi
echo -e "\n\n==SUMMARY=="
echo -e "\t Processed $networks networks"
echo -e "\t IP overlap found: $ip_overlap"