Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions support/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ RUN apk add --no-cache \
iproute2 \
ipvsadm \
conntrack-tools \
jq \
bash

WORKDIR /bin
Expand Down
13 changes: 12 additions & 1 deletion support/support.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ IPTABLES="${IPTABLES:-iptables}"
IPVSADM="${IPVSADM:-ipvsadm}"
IP="${IP:-ip}"
SSDBIN="${SSDBIN:-ssd}"
JQ="${JQ:-jq}"

networks=0
containers=0
Expand Down Expand Up @@ -53,6 +54,7 @@ type -P ${BRIDGE} > /dev/null || echo "This tool requires bridge"
type -P ${IPTABLES} > /dev/null || echo "This tool requires iptables"
type -P ${IPVSADM} > /dev/null || echo "This tool requires ipvsadm"
type -P ${IP} > /dev/null || echo "This tool requires ip"
type -P ${JQ} > /dev/null || echo "This tool requires jq"

if ${DOCKER} network inspect --help | grep -q -- --verbose; then
NETINSPECT_VERBOSE_SUPPORT="--verbose"
Expand Down Expand Up @@ -89,7 +91,16 @@ for networkID in $(${DOCKER} network ls --no-trunc --filter driver=overlay -q) "
echo_and_run ${NSENTER} --net=${i} ${IP} -o -4 address show
echo_and_run ${NSENTER} --net=${i} ${IP} -4 route show
echo_and_run ${NSENTER} --net=${i} ${IP} -4 neigh show
echo_and_run ${NSENTER} --net=${i} ${BRIDGE} fdb show
bridges=$(${NSENTER} --net=${i} ${IP} -j link show type bridge | ${JQ} -r '.[].ifname')
# break string to array
bridges=(${bridges})
for b in "${bridges[@]}"
do
if [ -z ${b} ] || [ ${b} == "null" ]; then
continue
fi
echo_and_run ${NSENTER} --net=${i} ${BRIDGE} fdb show br ${b}
done
echo_and_run ${NSENTER} --net=${i} ${IPTABLES} -w1 -n -v -L -t filter | grep -v '^$'
echo_and_run ${NSENTER} --net=${i} ${IPTABLES} -w1 -n -v -L -t nat | grep -v '^$'
echo_and_run ${NSENTER} --net=${i} ${IPTABLES} -w1 -n -v -L -t mangle | grep -v '^$'
Expand Down