diff --git a/libnetwork/support/support.sh b/libnetwork/support/support.sh index f85963f2c3..e95ed828e4 100755 --- a/libnetwork/support/support.sh +++ b/libnetwork/support/support.sh @@ -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"