File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-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
BRCTL=" ${BRCTL:- brctl} "
8
18
IPTABLES=" ${IPTABLES:- iptables} "
19
+ SSDBIN=" ${SSDBIN:-/ ssd} "
9
20
10
21
NSDIR=/var/run/docker/netns
11
22
BRIDGEIF=br0
@@ -35,3 +46,18 @@ for networkID in $(${DOCKER} network ls --filter driver=overlay -q) ; do
35
46
${NSENTER} --net=${nspath[0]} ${BRCTL} showmacs ${BRIDGEIF}
36
47
echo " "
37
48
done
49
+
50
+
51
+ if [ " true" == ${SSD} ] ; then
52
+ echo " " ; echo " #### SSD control-plane and datapath consistency check on a node ####"
53
+ for netName in $( docker network ls -f driver=overlay --format " {{.Name}}" ) ; do
54
+ echo " ## $netName ##"
55
+ ${SSDBIN} $netName
56
+ echo " "
57
+ done
58
+ echo " " ; echo " #### SSD control-plane consistency check across nodes in a cluster ####"
59
+ for netName in $( docker network ls -f driver=overlay --format " {{.Name}}" ) ; do
60
+ echo " ## $netName ##"
61
+ ${SSDBIN} $netName gossip-consistency
62
+ done
63
+ fi
You can’t perform that action at this time.
0 commit comments