Commit Graph
6945 Commits
Author SHA1 Message Date
Murali Reddy d2a9a51296 follow project conventions in ordering the imports 2018-12-04 10:58:43 +05:30
Murali Reddy 81b17469f4 prevent kubernetes node connecting to self by excluding the node IP from the list of the peers passed to weaver
Fixes #3398
2018-11-21 11:47:30 +05:30
Bryan Boreham 6e3f8a1c7a Add release v2.5.0 v2.5.0 2018-11-05 15:34:36 +00:00
Bryan Boreham eb77970534 Make build image depend on tools subdir
Missed from 0164d24583
2018-11-05 15:33:37 +00:00
Bryan Boreham f53dfdea61 Merge pull request #3442 from weaveworks/issues/3336-promisc
net: Do not set bridge hw addr when creating it
2018-11-01 21:09:34 +00:00
Martynas Pumputis 6c58bd7815 net: Do not set bridge hw addr when creating it
Prior "bridge: Change local fdb entries whenever mac address of bridge device changes" [1],
FDB entry for a bridge was not inserted when creating the bridge and it could
only be inserted when a hw address of the bridge was changed. Therefore, on
an older than the 3.14 kernel containers were not able to reach
the "weave" bridge w/o setting the promiscuous mode on.

This should have hit hard Kubernetes users as the weave bridge in their
case is used as a default gateway, and thus it works only after manually
enabling the promiscuous mode.

Additionally, w/o the promiscuous mode a packet sent from a container and
destined to the gateway is flooded on all ports, so it can reach
the "datapath" device resulting in the "Vetoed installation of hairpin flow" error.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a4b816d8ba1c1917842dc3de97cbf8ef116e043e
2018-11-01 18:58:59 +02:00
Bryan Boreham 83d9292a5b Merge branch '2.4' 2018-11-01 14:19:09 +00:00
Bryan Boreham 37bc04f851 Fix master deploy step: run newer manifest-tool and build all architectures
The version of manifest-tool in `weshigbee/manifest-tool` is version
0.3.0 and is erroring on every build; latest is 0.8.0 and doesn't error.

Since we are no longer limited to what will run in a container at
CircleCI, also build all architectures.
2018-11-01 12:26:49 +00:00
Bryan Boreham a5161b28f5 Merge pull request #3399 from weaveworks/rmpeer
watch for Kubernetes node delete events and reclaim removed peers IP space on delete event
2018-11-01 11:08:53 +00:00
Bryan Boreham c6cd5f53db Merge pull request #3439 from Ashiroq/master
Change log-level to debug for proxy access
2018-11-01 11:07:47 +00:00
Bryan Boreham 29bbd321b4 Merge pull request #3431 from weaveworks/issue-3324
add checkpoint to include Kubernetes cluster information
2018-11-01 11:06:47 +00:00
Bryan Boreham ba469bd641 Merge pull request #3415 from weaveworks/db-panic
prevent a case where tryOps endsup called recursivley when persisted data exists but has empty data
2018-11-01 11:05:06 +00:00
Murali Reddy bc9939fcdc add delay before checking ipam status 2018-11-01 14:51:19 +05:30
Murali Reddy c48c746791 replace peerlist with current set of Kubernetes nodes 2018-10-31 18:06:48 +05:30
Murali Reddy d3c5241f12 addressing review comments 2018-10-31 17:26:55 +05:30
Adrian Suwała 4d4584db2b Change log-level to debug for proxy access 2018-10-30 14:46:26 +01:00
Murali Reddy 427d694e1b add checkpoint to include Kubernetes cluster information
Fixes #3324
2018-10-30 13:33:12 +05:30
Murali Reddy f16d4561e0 remove realunch weave pod to test the unreachable_ip_addresses_count 2018-10-30 12:34:28 +05:30
Murali Reddy f334575e69 perform weave connect replace on node delete with empty peer list 2018-10-30 11:54:59 +05:30
Murali Reddy ea423755cc review comment: removing unnessary verbose code 2018-10-30 10:56:05 +05:30
Bryan Boreham db697fdaa5 Merge pull request #3435 from weaveworks/issues/fix-golint-import-path
Fix and improve build/Dockerfile
2018-10-29 16:37:53 +00:00
Martynas Pumputis c3aa03229c Use https for downloading libpcap 2018-10-26 10:07:50 +03:00
Martynas Pumputis 637bdf66b1 Change golint import path
See https://github.com/golang/lint/issues/415
2018-10-26 09:57:42 +03:00
Murali Reddy 4a40380d0f addressing review comments 2018-10-24 13:45:35 +05:30
Murali Reddy df467be26e watch for node delete events and call reclaimRemovedPeers 2018-10-24 13:45:35 +05:30
Murali Reddy edba711283 update client-go to include informeres, listers 2018-10-24 13:45:35 +05:30
Bryan Boreham 1b01da45f5 Merge pull request #3430 from weaveworks/bump-go-odp
Bump go-odp dependency
2018-10-17 18:03:44 +01:00
Bryan Boreham bf9985b0c8 Merge pull request #3423 from weaveworks/issue-3344
Replace weave-local-pods ipset with physdev iptables rule
2018-10-17 18:03:26 +01:00
Murali Reddy 408e5f7bdd make error message more appropriate 2018-10-17 21:16:52 +05:30
Martynas Pumputis 46177657b2 Bump go-odp dependency
To include the fix https://github.com/weaveworks/go-odp/pull/7.
2018-10-17 15:23:38 +03:00
Murali Reddy d351b9f020 remove weave-local-pods ipset which no longer used by weave-npc 2018-10-17 15:34:46 +05:30
Bryan Boreham 727fe46b2a Merge pull request #3385 from weaveworks/retry_forwarder
Add logic to re-try chooseBest() (which will select best forwarder)
2018-10-16 16:37:31 +01:00
Bryan Boreham b10af5a6cb Fix golint path - it moved upstream 2018-10-16 14:04:33 +00:00
Bryan Boreham 965b5c627e Merge pull request #3421 from weaveworks/2018-09-28-moar-initialDelaySeconds
kubernetes: Morph the livenessProbe into readinessProbe
2018-10-16 14:46:34 +01:00
Murali Reddy d00e7335bb dont maintain weave-local-pods ipset on pod add/delete/update 2018-10-16 14:02:23 +05:30
Murali Reddy e3eb16a1f9 addressing review comments 2018-10-09 11:21:47 +05:30
Bryan Boreham 078b76f3f1 Merge pull request #3416 from weaveworks/issue-3386
own action to reclaim when peer does not exist
2018-10-05 09:27:46 +01:00
Murali Reddy 6b2631e378 addressing review comment. keep forwarder running forever even on heart beat timeouts 2018-10-05 09:47:23 +05:30
Murali Reddy 59c1abe9b9 addressing review comments 2018-10-04 14:08:56 +05:30
Murali Reddy 4f9f0dfc3e Replace weave-local-pods ipset with physdev iptables rule
by-pass ingress network policy chains and accept the packet if
destination is not one of the local pods

return the packets so the egress network policy chains are skipped
in case packet's source is not one of the local pods

Fixes #3344
2018-10-02 11:02:36 +05:30
Damien Lespiau 8d44f49edd kubernetes: Morph the livenessProbe into readinessProbe
The liveness probe has the not-so-great side effect of killing the weave pods
if anything goes wrong, making debugging really difficult.

Not only that, we also bumped into the livenessProbe killing pods before they
had a chance to start (see below for the full story).

The readinessProbe is only used for Kubernetes Services: no traffic will be
routed to non-Ready pods when using the Service IP. We can use to to signal the
user something in wrong with Weave Net while not having Kubernetes delete the
pods behind our backs.

I removed the ininitialDelaySeconds field as Kurbernetes won't kill the pod if
not ready.

Notes from a debugging session:

Some nodes may have a vast amount of iptables rules, making each iptables
command take a few seconds (~5-10s). At startup, when the weave container
creates its chains, it runs quite a few iptables commands and the total time of
execution was > 30s.

It's important to note that, at this point, the weave process hasn't started as
those iptables commands are run by an initial script.

Kubernetes was trying to check for the container liveness, was failing, and
then proceeded to kill the weave pods before they had a chance to fully start.
2018-09-28 15:50:39 +01:00
Murali Reddy 7a959df648 handles an edge case where peer claimed to own the action (to reclaim) but no longer
exists hence lock persists foever, fix makes a peer own the reclaim when nonexistent node found

Fixes #3386
2018-09-27 16:00:44 +05:30
Bryan Boreham 53fd33044a Merge pull request #3412 from weaveworks/gke
add rbac prerequisite for using weave net on GKE
2018-09-26 14:41:59 +01:00
Murali Reddy 1806ca5665 add rbac prerequisite for using weave net on GKE
fixes #3111
2018-09-26 18:51:40 +05:30
Murali Reddy 7141ccc271 prevent a case where tryOps endsup called recursivley when persisted data exists
but has empty data

Fixes #3067
2018-09-26 16:10:06 +05:30
Bryan Boreham a73330f752 Merge branch '2.4' 2018-09-26 10:20:04 +01:00
Bryan Boreham 427e7a6868 Merge pull request #3408 from weaveworks/issues/3405-tracker-nil-deref
ipam: Do not deref nil in GET /ipinfo/tracker if tracker doesn't exist
2018-09-25 12:29:03 +01:00
Murali Reddy b3cb38eda4 addressing review comments 2018-09-24 17:53:28 +05:30
Murali Reddy 62758ca337 log the heartbeat send/recieve/miss 2018-09-21 16:45:47 +05:30
Murali Reddy 3c67c3c5f1 changes differentiate beteween fatal errors (for e.g. ipsec init)
from transient errors (heartbeast misses). In case of transient
errors OverlayForwarder is marked to be unhealty. When overlay forwarder
is unhealty its hept on hold so chooseBest() will skip selecting the forwrder

Once OverlayForwarder is considered healthy run chooseBest() again so the
forwarder can be selected if its the best forwarder

Fixes #1737
2018-09-21 16:45:47 +05:30