mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Added support for Swarm Service Driller (ssd)
Signed-off-by: Jim Carroll <jim.carroll@docker.com>
This commit is contained in:
parent
3321709a62
commit
a478edc819
1 changed files with 20 additions and 0 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue