Commit Graph
100 Commits
Author SHA1 Message Date
Bryan Boreham 8e50e0759d Make attach and detach idempotent 2014-09-23 14:49:00 +01:00
Bryan Boreham 2d8318b158 Improved test for blank string 2014-09-23 13:53:20 +01:00
Bryan Boreham a6b83a1234 Updated instructions for attach and detach 2014-09-23 13:52:41 +01:00
Bryan Boreham d1896e86d0 Redesigned attach/detach 2014-09-23 13:01:21 +01:00
Bryan Boreham 7815446032 Merge pull request #78 from zettio/77_eliminate_connection_maker_tick
eliminate periodic 'tick' in connection_maker
2014-09-23 10:58:25 +01:00
Bryan Boreham 451d7d8778 Merge remote-tracking branch 'upstream/master' into HEAD 2014-09-22 17:57:32 +01:00
Bryan Boreham 1b524c4f27 Updated to reflect version-tagging process 2014-09-22 17:56:42 +01:00
Bryan Boreham 6ed2ab10a1 Only push two tags - latest and git-commit - to DockerHub 2014-09-22 17:44:13 +01:00
Bryan Boreham 47310fbfc5 Described attach and detach commands 2014-09-18 18:00:58 +01:00
Bryan Boreham 0947fc204f Untabify 2014-09-18 17:20:08 +01:00
Bryan Boreham 4868585d6e Add detach command 2014-09-18 17:18:54 +01:00
Bryan Boreham bb629bac84 Merge remote-tracking branch 'upstream/master' into 67_attach 2014-09-18 12:45:51 +01:00
Bryan Boreham 3c871e69d2 Merge branch 'master' of https://github.com/binocarlos/weave into 67_attach
Conflicts:
	weaver/weave
2014-09-18 12:42:46 +01:00
Bryan Boreham a671ca1a89 Merge branch 'add-attach' of https://github.com/adieu/weave into 67_attach 2014-09-18 12:31:53 +01:00
Bryan Boreham 0ed57bad67 rm tempfile before we use it, to avoid attack via symlink 2014-09-18 11:56:15 +01:00
Bryan Boreham 86644f7615 cosmetic 2014-09-18 11:55:47 +01:00
Bryan Boreham c48ae19c55 Tidy up messages; ensure errors to to stderr 2014-09-18 11:47:47 +01:00
Bryan Boreham a75a0d8709 If and only if network setup because the container died, say so.
This involves capturing stderr output from all the 'ip' commands so we
can hide that output if we see the process died, or show it to the user
if the process didn't die, in which case we don't know why we failed.
2014-09-18 11:24:08 +01:00
Bryan Boreham bfd5007339 Don't test if symlink exists before 'rm -f'
When the symlink's target doesn't exist, '[ -f' is false, so the symlink doesn't get removed.
Since we do always want it to be removed, just call 'rm -f' anyway, which won't complain
if the file doesn't exist.
2014-09-18 11:03:06 +01:00
Bryan Boreham f0191639de Start the tick again, in case we need it 2014-09-18 06:51:12 +01:00
Bryan Boreham 2720d24183 Attempt re-connection immediately when notified of a broken connection 2014-09-18 06:48:56 +01:00
Bryan Boreham 2f5a9733b8 Take out debugging -x mode 2014-09-17 16:32:21 +01:00
Bryan Boreham 0a403dd081 untabify 2014-09-17 16:31:52 +01:00
Bryan Boreham 09aed84638 return not exit from function 2014-09-17 16:30:50 +01:00
Bryan Boreham eabcc55f73 fix subshell syntax and make del/delete consistent 2014-09-17 16:25:46 +01:00
Bryan Boreham fd7b034713 untabify 2014-09-17 16:11:30 +01:00
Bryan Boreham 7c979d6725 Remove veth and/or netns symlink if interface configuration fails part-way through 2014-09-17 15:44:34 +01:00
Bryan Boreham 8bac04d080 Remove message about unknown peer from the log 2014-09-17 13:19:52 +01:00
Bryan Boreham c8876e144f Revert "Change iteration over connection decoding to abort after the first error, and let the UnknownPeersError know which peer was unknown"
This reverts commit 978d374820.
2014-09-17 13:18:33 +01:00
Bryan Boreham 4e7aa85de0 Revert "Make message for UnknownPeersError more meaningful"
This reverts commit 752cfdcb67.
2014-09-17 13:18:07 +01:00
Bryan Boreham a25ccbb261 Merge branch 'master' into 29_unknown_peer 2014-09-17 12:59:30 +01:00
Bryan Boreham 752cfdcb67 Make message for UnknownPeersError more meaningful 2014-09-16 11:11:54 +01:00
Bryan Boreham 978d374820 Change iteration over connection decoding to abort after the first error, and let the UnknownPeersError know which peer was unknown 2014-09-16 09:32:53 +01:00
Bryan Boreham 464a1c8246 Show the IP address on the end of each connection 2014-09-15 17:50:04 +01:00
Bryan Boreham 81ad24b10f Don't need 'exit 0' any more 2014-09-15 16:50:50 +01:00
Bryan Boreham 58c59caf1c Merge branch 'master' into 56_display_version 2014-09-15 16:49:27 +01:00
Bryan Boreham 66b28593b2 Fix indenting 2014-09-15 16:48:12 +01:00
Bryan Boreham 0732968ed0 Add instructions to fetch the latest image 2014-09-15 16:44:12 +01:00
Bryan Boreham dbe725b8ac Add 'weave version' to the README 2014-09-15 16:40:17 +01:00
Bryan Boreham 87a4dee7ea Added 'weave version' command per Issue #56 2014-09-15 16:32:19 +01:00
Bryan Boreham 25c4adf68e Don't need :latest on tag command 2014-09-15 16:00:08 +01:00
Bryan Boreham 1748b6e790 Merge remote-tracking branch 'upstream/master' 2014-09-15 15:42:44 +01:00
Bryan Boreham 976d36571a Add MAINTAINER line 2014-09-15 15:42:05 +01:00
Bryan Boreham f57058f627 Use git commit hash instead of requiring user to enter a version tag on 'make publish' 2014-09-15 15:33:09 +01:00
Bryan Boreham 7e8ac8c4d0 don't need ':latest' on the build line 2014-09-15 15:04:22 +01:00
Bryan Boreham 500bda596c Don't do the print args thing in this branch 2014-09-15 14:42:39 +01:00
Bryan Boreham 18f65dc344 Add 'publish' target to tag and push release 2014-09-15 14:40:57 +01:00
Bryan Boreham 244188776f Add tag to build command, so you can do "make tag=x.xx" to add a version number to the image 2014-09-15 14:26:13 +01:00
Bryan Boreham 39003233ea Remove version/build-date info from weaver binary 2014-09-15 14:05:15 +01:00
Bryan Boreham 9be3a11e10 cosmetic 2014-09-12 18:04:18 +01:00
Bryan Boreham 21bec9fc78 Add a -version command to weave and weaver, implemented by embedding the build date by the makefile 2014-09-12 17:53:06 +01:00
Bryan Boreham 6483c89a2b Factor out commands implemented via the REST interface 2014-09-12 17:51:30 +01:00
Bryan Boreham ef35839d4b Merge remote-tracking branch 'upstream/master' into 23_retry_peers 2014-09-11 19:32:12 +01:00
Bryan Boreham 661b3f4da1 command-line addresses are already normalised so don't need to do it again 2014-09-10 17:40:39 +01:00
Bryan Boreham c6d8623b6f Only signal connection failures; remove successful connections when we see them 2014-09-10 16:17:56 +01:00
Bryan Boreham 0e23c29cae cosmetic 2014-09-10 16:02:50 +01:00
Bryan Boreham ba72999b04 cosmetic 2014-09-10 16:02:17 +01:00
Bryan Boreham 651c0a0c27 Remove tickNow() function 2014-09-10 16:00:31 +01:00
Bryan Boreham c28ff33c84 Avoid waiting 5 seconds before starting 2014-09-10 15:26:13 +01:00
Bryan Boreham 83175cdd0a Normalise IP addresses when adding to collections 2014-09-10 15:25:10 +01:00
Bryan Boreham e5bd3933d8 Normalise peer address before checking 2014-09-10 14:59:32 +01:00
Bryan Boreham 2050569fb6 Break checkStateAndAttemptConnections into phases, and track the end of all connection attempts 2014-09-10 14:50:43 +01:00
Bryan Boreham 9d0af9dbfe Keep targets around until their attempt fails 2014-09-10 14:18:41 +01:00
Bryan Boreham 4335615688 Track command-line targets in a separate set, to simplify tracking of targets 2014-09-10 14:12:37 +01:00
Bryan Boreham 634d4e0fe3 cosmetic 2014-09-10 13:45:56 +01:00
Bryan Boreham cd92fad369 Simplify lookup in our_connected_peers 2014-09-10 13:15:56 +01:00
Bryan Boreham b3b3ba9a21 cleaned up reconnect algorithm to improve locking, replace count with bool 2014-09-10 13:08:20 +01:00
Bryan Boreham 3644531c50 change counts to boolean when deciding if everything is connnected 2014-09-10 12:35:28 +01:00
Bryan Boreham 26f8a68a82 Remove stuff that is not needed with new ConnectionMaker approach 2014-09-10 12:29:21 +01:00
Bryan Boreham 84aeaf340a New implementation of ConnectionMaker just periodically scanning who we need to connect to 2014-09-10 12:08:49 +01:00
Bryan Boreham 42ce45dd55 remove debugging code added by accident 2014-09-09 13:10:37 +01:00
Bryan Boreham 2863d672f9 Merge branch '23_retry_peers' of https://github.com/bboreham/weave into 23_retry_peers 2014-09-09 13:08:50 +01:00
Bryan Boreham dc927314ba Revert "Move a couple of commmon bits of code out to utils.go"
This reverts commit c1856e1ff1.
2014-09-09 13:07:55 +01:00
Bryan Boreham c1856e1ff1 Move a couple of commmon bits of code out to utils.go 2014-09-09 13:06:37 +01:00
Bryan Boreham c074c2991d Pull a couple of common bits of code out into utils.go 2014-09-09 13:03:14 +01:00
Bryan Boreham 527ddfca0d Clean up naming of commands and states 2014-09-09 12:04:05 +01:00
Bryan Boreham 6aaa57606a Merge branch '23_retry_peers' of https://github.com/bboreham/weave into 23_retry_peers 2014-09-09 11:45:49 +01:00
Bryan Boreham 8271cbf007 In status message, change "Reconnects" to "Connections" to match what it now does 2014-09-09 11:45:09 +01:00
Bryan Boreham c07a034e9f Merge branch '23_retry_peers' of https://github.com/bboreham/weave into 23_retry_peers 2014-09-09 11:40:06 +01:00
Bryan Boreham f1f1553a78 Merge remote-tracking branch 'upstream/master' into 23_retry_peers 2014-09-09 11:39:50 +01:00
Bryan Boreham 2f53df8a97 Check if we already have a connection on an address before attempting to connect to it 2014-09-09 11:27:46 +01:00
Bryan Boreham 6809a43d49 Merge remote-tracking branch 'upstream/master' into 23_retry_peers 2014-09-08 17:40:09 +01:00
Bryan Boreham 924ebc0d88 Merge branch '23_retry_peers' of https://github.com/bboreham/weave into 23_retry_peers 2014-09-08 17:35:05 +01:00
Bryan Boreham 3ceef27921 Merge branch 'master' into 23_retry_peers 2014-09-08 17:34:36 +01:00
Bryan Boreham f8f32a60ba Move call to tell ConnectionMaker that connection is established onto the queryLoop goroutine to avoid races with shutdown events 2014-09-08 17:31:38 +01:00
Bryan Boreham 64999d830d State of connection is now three-way choice rather than two booleans 2014-09-08 17:30:54 +01:00
Bryan Boreham f3cf2b598d Add back blank line that got spuriously deleted 2014-09-08 16:33:04 +01:00
Bryan Boreham 16e9daf057 Reformatted with 'go fmt' 2014-09-08 16:25:55 +01:00
Bryan Boreham de7f4df7c9 Merge branch '23_retry_peers' of https://github.com/bboreham/weave into 23_retry_peers 2014-09-08 16:06:43 +01:00
Bryan Boreham a3312c822c Attempt to connect immediately when given a new connection 2014-09-08 16:05:54 +01:00
Bryan Boreham c58e3ae174 Merge branch 'master' into 23_retry_peers 2014-09-08 15:45:03 +01:00
Bryan Boreham 5cf2cb0c50 Keep track of which connections have been established 2014-09-08 15:36:19 +01:00
Bryan Boreham dec794eb72 Remove all references to PeerName in ConnectionMaker 2014-09-08 15:05:50 +01:00
Bryan Boreham 8b3e97b96a Change from stating which peer we expect to be on the end of a connection to accepting any known peer 2014-09-08 14:07:42 +01:00
Bryan Boreham 0a94388f0a Change ConnectionMaker from being focused on PeerName to being focused on address 2014-09-08 12:42:06 +01:00
Bryan Boreham b69682a626 Merge remote-tracking branch 'upstream/master' into 23_retry_peers 2014-09-05 19:03:49 +01:00
Bryan Boreham 783ee21461 Continue after we establish that there is nothing left to do for failedCOnnection 2014-09-05 18:28:42 +01:00
Bryan Boreham 5c7010625a Remove entries from the failedConnection list when they succeed.
Avoids unsightly error messages where both ends make the same
connection and we then have to drop one of them.
2014-09-05 15:45:32 +01:00
Bryan Boreham 2d387e3847 Removed ConnectionMaker.activeConnections which is never used 2014-09-05 14:28:47 +01:00
Bryan Boreham 54d7972b5e Don't start a new connection attempt until all in-flight attempts for this peer have finished
Also cleaned up the naming slightly
2014-09-05 14:26:42 +01:00