Free IPAM addresses individually in 'weave hide', because the user now has the ability to free some subnets and not others
This commit is contained in:
1 parent
a617e7918c
commit
d18ccac43b
1 file changed
+3
-1
@@ -1156,8 +1156,10 @@ case "$COMMAND" in
|
|||||||
delete_iptables_rule nat WEAVE -s $CIDR ! -d $CIDR -j MASQUERADE
|
delete_iptables_rule nat WEAVE -s $CIDR ! -d $CIDR -j MASQUERADE
|
||||||
when_dns_running delete_dns 'weave:expose' $CIDR
|
when_dns_running delete_dns 'weave:expose' $CIDR
|
||||||
fi
|
fi
|
||||||
|
# Tell IPAM we don't need this address, but ignore errors because
|
||||||
|
# the address might not have come from IPAM
|
||||||
|
http_call $CONTAINER_NAME $HTTP_PORT DELETE /ip/weave:expose/${CIDR%/*} >/dev/null 2>&1 || true
|
||||||
done
|
done
|
||||||
[ $CIDR_COUNT -eq 0 ] && http_call $CONTAINER_NAME $HTTP_PORT DELETE /ip/weave:expose 2>/dev/null || true
|
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
[ $# -eq 0 ] || usage
|
[ $# -eq 0 ] || usage
|
||||||
|
|||||||
Reference in new issue
Block a user