245 Commits
Author SHA1 Message Date
Raj Chaudhuri e50040883f Docker API client version bumped to 1.24 everywhere 2024-03-07 19:27:12 +05:30
Raj Chaudhuri c1d3107418 Changed module name, edited default manifests in prog/weave-kube
* Module name changed to `github.com/rajch/weave`
* Added environment variable `CHECKPOINT_DISABLE=1` to default manifests, to bypass weaveworks telemetry
2024-03-01 18:05:19 +05:30
Bryan Boreham 34dc4dabce Clean up some lint warnings
I ran golangci-lint and it pointed out a few things to clean up.
2020-07-31 10:28:55 +00:00
Bryan Boreham df52117bfa Remove unused code 2020-07-31 09:03:27 +00:00
Adrian Suwała 4d4584db2b Change log-level to debug for proxy access 2018-10-30 14:46:26 +01:00
Bryan Boreham e7f30106c0 Pass the WeaveDNS Domain into the proxy
instead of obtaining it via the http api
2018-01-29 15:55:36 +00:00
Bryan Boreham 86d2800b59 Make proxy use configured WeaveDNS address
rather than assuming it is listening on the weave bridge
2018-01-29 15:55:36 +00:00
Martynas Pumputis 7ea82204e0 Merge pull request #3089 from weaveworks/improve-flags
Improve flag handling
2017-11-13 17:31:33 +02:00
Martynas Pumputis 80b286ebf7 Merge pull request #3138 from weaveworks/issues/3136-fix-etc-hosts
Add back EXEC_IMAGE so proxy can docker-run itself

Fixes #3136
2017-10-05 13:14:16 +02:00
Bryan Boreham 35c017a787 Remove explicit error check at end of functions to placate lint
It's sad because this changes a regular pattern into an irregular one,
which will create spurious diffs if more work is added at the end of
the function.  Still, this is easier than fixing the lint runner to
ignore the report.
2017-10-04 13:40:13 +00:00
Bryan Boreham 79d65bc98b Report errors from rewriting /etc/hosts 2017-10-04 13:32:52 +00:00
Bryan Boreham 98b002f7c0 Remove unnecessary 'Version' in proxy 2017-09-26 09:44:46 +00:00
Bryan Boreham a0d0b00938 Pass check-alive flag on claim for container 2017-06-12 14:03:53 +00:00
Bryan Boreham 37526728e0 Merge branch '1.9' 2017-05-30 13:55:49 +00:00
Bryan Boreham b0da4f6b91 Move proxy and plugin status from shell to Go
In the process we stop printing out the `PLUGIN_FULL_NAME`, but that
is assumed to be something the user can figure out from `docker plugin ls`
2017-05-17 09:27:22 +00:00
Bryan Boreham bf3ecaf48a Remove proxy status.sock 2017-05-13 16:31:16 +01:00
Bryan Boreham 0273491e6e Pass check-alive flag to IPAM API 2017-05-12 06:56:52 +00:00
Bryan Boreham b1917d909a Move proxy attach from shell to Go
Note we don't need to propagate shell-script env vars now
2017-05-12 06:56:52 +00:00
Bryan Boreham edbf85655a Move rewrite /etc/hosts from shell to Go 2017-05-12 06:56:52 +00:00
Bryan Boreham be917eb86b Refactor: introduce runTransientContainer function
also specify that it needs no container network
2017-05-12 06:56:52 +00:00
Bryan Boreham 0a2521e7a4 Introduce StubProxy() so weaveutil can call functions on it
implies change type of docker client to weavedocker

so we can call things like Info() on it
2017-05-12 06:56:52 +00:00
Bryan Boreham 1b8d115b63 Refactor: make weave API a part of the proxy struct 2017-05-12 06:56:52 +00:00
Bryan Boreham 7611cd963c Don't return OK from status until all parts are ready 2017-05-11 14:02:45 +00:00
Marc CARRE 5cf973f03a Add --proxy option to enable/disable proxy.
Weave Net initially had the ability to start a single component at a time with `launch-proxy` and `launch-router`.
This change enables this again via `--proxy=false` despite the merge of the proxy and the router.
Note that by default:
- `launch` passes `--proxy` which enables the proxy and keeps behaviour consistent with `launch` pre-merge,
- `weaver` defaults `--proxy` to `false` which disables the proxy and keeps behaviour consistent with `weaver` pre-merge (as it was `weaveproxy`'s responsibility).
2017-05-10 10:25:36 +00:00
Marc CARRE b654ac178c Merge proxy and router/weaver processes.
Note: we no longer need to detect awsvpc when launching.
The "AWS VPC" mode is now set via the `--awsvpc` flag.
Before we had to "detect" it when the proxy was potentially started
later, after the router had started.

We drop WEAVEPROXY_DOCKER_ARGS as obsolete.
2017-05-10 10:25:23 +00:00
Bryan Boreham f479e57870 Remove attach-router since it no longer does anything 2017-04-17 19:41:47 +00:00
Bryan Boreham 11d120bb5b Debug log any error returned by exec-ing weave 2017-03-06 11:29:09 +00:00
Bryan Boreham 6ef302b8a1 Extract FindBridgeIP to net package 2016-12-23 11:57:04 +00:00
Bryan Boreham c03a2caac2 Allow docker0 to have >1 IP address
and log the one we end up using
2016-12-09 15:22:49 +00:00
Adam Harrison f73355abcc Incorporate Docker's malformed host fix 2016-11-14 15:13:19 +00:00
Martynas Pumputis e611f04f41 Move NetDev utils from common/ to net/ 2016-10-19 17:03:30 +01:00
Martynas Pumputis 05baa566c6 Refactor common.GetBridgeNetDev
- Optimize. Use LinkByName instead of iterating over list of available
  links. Linux does not support interfaces with the same names.
- Remove unnecessary indirection in utility functions which return
  common.NetDev.
2016-07-05 15:12:39 +01:00
Bryan Boreham f86ade6568 Squash up the code via 'defer' 2016-06-17 16:52:17 +01:00
Bryan Boreham 81fa4059df Use buffered writer for http headers 2016-06-17 16:52:17 +01:00
Matthias Radestock 0abfdf4efb Merge branch '1.5' 2016-06-17 15:07:34 +01:00
Bryan Boreham 56c275a9bf Copy Docker's response code through for raw stream.
This means when Docker says "101 UPGRADED" the proxy will say the
same, instead of "200 OK".  Docker 1.12 barfs if you do that.
2016-06-17 13:07:04 +01:00
Matthias Radestock 7a1bd27a58 Merge branch '1.5' 2016-06-13 15:24:49 +01:00
Matthias Radestock aca34191da Merge pull request #2365 from weaveworks/issues/2283-validate-cidrs
Validate CIDRs in proxy before attaching a container

Fixes #2283
2016-06-13 15:15:48 +01:00
Martynas Pumputis df5508c0f3 Check CIDRs before attaching a container in proxy
If any cidr is invalid, a user will get the following error:
"docker: Error response from daemon: invalid WEAVE_CIDR: $CIDR".
2016-06-13 14:54:16 +01:00
Adam Harrison d4de48aeee Merge branch '1.5'
Closes #2302
2016-06-06 15:21:54 +01:00
Bryan Boreham dac2124cd1 Don't weave-attach containers which are using a network plugin
Particularly intended for cases where the user has configured the
proxy and also said --net=weave, but will catch any other plugin
similarly
2016-06-03 14:11:15 +01:00
Bryan Boreham 153ed601be Check if socket is identical to weave socket after trimming prefix.
This allows us to run 'weave proxy -H /var/run/weave/weave.sock'
2016-06-03 13:34:43 +01:00
Matthias Radestock caeff127c9 Merge branch '1.5' 2016-05-24 11:27:42 +01:00
Adam Harrison 885b6195f6 Flush chunked response header immediately 2016-05-24 08:28:24 +01:00
Bryan Boreham ff81ecfd41 Move kill-on-failure responsibility to caller of weave script 2016-05-16 13:38:22 +01:00
Bryan Boreham 8d71467802 Kill process instead of container, on container restart.
When Docker restarts a container and something goes wrong attaching
the network, kill the process inside the container instead of killing
the container, so that Docker will restart it again
2016-05-06 18:02:11 +01:00
Bryan Boreham 5993b3e846 Refactor: extract function to look up waiting channel for container 2016-05-06 12:45:03 +01:00
Matthias Radestock 3e07f03c87 Merge branch '1.4' 2016-04-05 17:26:01 +01:00
Bryan Boreham 66c92fe075 Don't attempt to parse JSON payload if it is 0 bytes long.
Also added a test to trigger this.
2016-04-05 16:47:11 +01:00
Matthias Radestock c25bfafcb2 refactor: make proxy log via a package-local var
which gets rid of a bunch of (dot) imports.
2016-03-20 08:31:23 +00:00