File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
+ while getopts " :s" opt; do
4
+ case $opt in
5
+ s)
6
+ SSD=" true"
7
+ ;;
8
+ esac
9
+ done
10
+
11
+ SSD=" ${SSD:- false} "
12
+
3
13
# Required tools
4
14
DOCKER=" ${DOCKER:- docker} "
5
15
NSENTER=" ${NSENTER:- nsenter} "
6
16
BRIDGE=" ${BRIDGE:- bridge} "
7
17
IPTABLES=" ${IPTABLES:- iptables} "
8
18
IPVSADM=" ${IPVSADM:- ipvsadm} "
9
19
IP=" ${IP:- ip} "
20
+ SSDBIN=" ${SSDBIN:- ssd} "
10
21
11
22
networks=0
12
23
containers=0
@@ -101,6 +112,15 @@ while read containerID status; do
101
112
printf " \n"
102
113
done < <( ${DOCKER} container ls -a --format ' {{.ID}} {{.Status}}' | cut -d' ' -f1,2)
103
114
115
+ if [ " true" == ${SSD} ] ; then
116
+ echo " " ; echo " #### SSD control-plane and datapath consistency check on a node ####"
117
+ for netName in $( docker network ls -f driver=overlay --format " {{.Name}}" ) ; do
118
+ echo " ## $netName ##"
119
+ ${SSDBIN} $netName
120
+ echo " "
121
+ done
122
+ fi
123
+
104
124
echo -e " \n\n==SUMMARY=="
105
125
echo -e " \t Processed $networks networks"
106
126
echo -e " \t IP overlap found: $ip_overlap "
You can’t perform that action at this time.
0 commit comments