Merge pull request #2075 from weaveworks/2044-multi-rmpeer

make `weave rmpeer` accept a list of peers
This commit is contained in:
Adam Harrison committed 2016-03-21 15:55:22 +00:00
commit 74d0b3b51e
2 files changed
+14 -9

No files matched your search

+6 -5
View File
@@ -14,12 +14,13 @@ network so if Weave Net is run again on that node it will start from
scratch. scratch.
For failed peers, the `weave rmpeer` command can be invoked to For failed peers, the `weave rmpeer` command can be invoked to
permanently remove the ranges allocated to said peer. This allows permanently remove the ranges allocated to said peers. This allows
other peers to allocate IPs in the ranges previously owned by the other peers to allocate IPs in the ranges previously owned by the
removed peer, and as such should be used with extreme caution - if the removed peers, and as such should be used with extreme caution: if the
removed peer had transferred some range of IP addresses to another removed peers had transferred some range of IP addresses to other
peer but this is not known to the whole network, or if it later peers but this is not known to the whole network, or if some of them
rejoins the Weave network, the same IP address may be allocated twice. later rejoin the Weave network, the same IP address may be allocated
twice.
Assume you had started the three peers in the example earlier, and Assume you had started the three peers in the example earlier, and
then host3 caught fire, you can go to one of the other hosts and run: then host3 caught fire, you can go to one of the other hosts and run:
+8 -4
View File
@@ -87,13 +87,14 @@ weave stop
stop-plugin stop-plugin
weave reset weave reset
rmpeer <nickname> | <weave internal peer ID> rmpeer <peer_id> ...
where <peer> = <ip_address_or_fqdn>[:<port>] where <peer> = <ip_address_or_fqdn>[:<port>]
<cidr> = <ip_address>/<routing_prefix_length> <cidr> = <ip_address>/<routing_prefix_length>
<addr> = [ip:]<cidr> | net:<cidr> | net:default <addr> = [ip:]<cidr> | net:<cidr> | net:default
<endpoint> = [tcp://][<ip_address>]:<port> | [unix://]/path/to/socket <endpoint> = [tcp://][<ip_address>]:<port> | [unix://]/path/to/socket
<peer_id> = <nickname> | <weave internal peer ID>
EOF EOF
} }
@@ -2223,9 +2224,12 @@ EOF
done done
;; ;;
rmpeer) rmpeer)
[ $# -eq 1 ] || usage [ $# -gt 0 ] || usage
PEER=$1 res=0
call_weave DELETE /peer/$PEER for PEER in "$@" ; do
call_weave DELETE /peer/$PEER || res=1
done
[ $res -eq 0 ]
;; ;;
launch-dns) launch-dns)
echo "The 'launch-dns' command has been removed; DNS is launched as part of 'launch' and 'launch-router'." >&2 echo "The 'launch-dns' command has been removed; DNS is launched as part of 'launch' and 'launch-router'." >&2