Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.7 backports 2020-04-01 #10818

Merged
merged 10 commits into from Apr 2, 2020
Merged

v1.7 backports 2020-04-01 #10818

merged 10 commits into from Apr 2, 2020

Conversation

joestringer
Copy link
Member

@joestringer joestringer commented Apr 1, 2020

Not backported due to conflicts:

Once this PR is merged, you can update the PR labels via:

$ for pr in 10518 10729 10767 10785 10641 10801 10805 10790; do contrib/backporting/set-labels.py $pr done 1.7; done

@joestringer joestringer requested a review from a team as a code owner April 1, 2020 22:46
@joestringer joestringer added backport/1.7 kind/backports This PR provides functionality previously merged into master. labels Apr 1, 2020
@joestringer
Copy link
Member Author

never-tell-me-the-odds

@joestringer joestringer force-pushed the pr/v1.7-backport-2020-04-01-1 branch from 5ef5a97 to b816ca2 Compare April 1, 2020 22:49
@joestringer
Copy link
Member Author

never-tell-me-the-odds

@joestringer joestringer force-pushed the pr/v1.7-backport-2020-04-01-1 branch from b816ca2 to d00b4c1 Compare April 2, 2020 00:22
@joestringer
Copy link
Member Author

never-tell-me-the-odds

borkmann and others added 10 commits April 1, 2020 20:10
[ upstream commit 424ea70 ]

[ Backporter's notes: Had to rebase against skb -> ctx translation, and
  include/bpf/api.h -> include/bpf/helpers.h move. ]

ct_create{4,6}() inserts related entries into the TCP CT tables given
the map is usually in the form of ct_create4(get_ct_map4(&tuple)) or
ct_create6(get_ct_map6(&tuple)). Similarly, the lookup parts are in
form of ct_lookup4(get_ct_map4(&tuple)) or ct_lookup6(get_ct_map6(&tuple)).

However, the tuples' nexthdr usually points to the one in the packet.
This means, we can /never/ find a related entry since it sits in the TCP
CT tables, but their lookup is always in the ANY table instead.

Fix the insertions by adding to the CT_MAP_ANY{4,6} tables and by that
implicityly double the capacity of TCP CT tables.

Go even beyond that by not creating related entries for CT_SERVICE entries.

It does not make sense to create CT_SERVICE entries with related flag
since we don't translate ICMP there anyway. Save overhead and don't add
them to the maps (same for NodePort/NAT related ones).

Fixes: 750b3f9 ("bpf: Split connection tracking for TCP and non-TCP")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Joe Stringer <joe@cilium.io>
[ upstream commit d933cfe ]

Signed-off-by: Chris Tarazi <chris@isovalent.com>
Signed-off-by: Joe Stringer <joe@cilium.io>
[ upstream commit 948659f ]

[ Backporter's notes: Had to add 'context' to the imports ]

The Kubernetes node was marked as ready after the daemon was finished
initializing. There were still several operations that could fail after
that point which could lead to a situation in which a node was marked
ready while the Cilium agent then later errored out, leading to a ready
but failing node.

Move the marking of the node readiness to the very end of the
bootstrapping.

Fixes: #10762

Signed-off-by: Thomas Graf <thomas@cilium.io>
Signed-off-by: Joe Stringer <joe@cilium.io>
[ upstream commit 912eb46 ]

In case 2 allocations with the same key are being allocated at the
same time one of them might retrieve the ID while the other will
try to allocate the ID in the CRD store. The issue occurs when the
localKeys map will ignore the 2nd key allocation since it won't accept 2
IDs for the same key. Having this failure might cause endpoints from
being restored in CRD mode.

Signed-off-by: André Martins <andre@cilium.io>
Signed-off-by: Joe Stringer <joe@cilium.io>
[ upstream commit 94dcaa7 ]

This patch adds helm NOTES.txt file to the respective template folders.

Fixes: #10070
Signed-off-by: Swaminathan Vasudevan <svasudevan@suse.com>
Signed-off-by: Joe Stringer <joe@cilium.io>
[ upstream commit 4459e83 ]

Fixes: 0bbb6c2 ("set explicit livenessProbe and readinessProbe timeout for connectivity checks that expect an L3 deny")

Signed-off-by: Thomas Graf <thomas@cilium.io>
Signed-off-by: Joe Stringer <joe@cilium.io>
[ upstream commit 2069570 ]

OpenShift DNS is using non-standard labels and non-standard namespace.

Signed-off-by: Thomas Graf <thomas@cilium.io>
Signed-off-by: Joe Stringer <joe@cilium.io>
[ upstream commit 09eebce ]

Make sure to always return an error code on failue.

Signed-off-by: Thomas Graf <thomas@cilium.io>
Signed-off-by: Joe Stringer <joe@cilium.io>
[ upstream commit 95529fb ]

Given bpf fs wasn't mounted before, then mount it with stricter
permissions than the default ones (777). Also add few other options
as discussed in #10793 such as `nosuid,nodev,noexec` though at least
from bpf fs side these are ignored.

Fixes: #10793
Reported-by: Travis Glenn Hansen <travisghansen@yahoo.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Joe Stringer <joe@cilium.io>
[ upstream commit 26dec4c ]

Fix unit test logic for the heartbeat function mock. In some test cases
this function should block until the test is finished so some of those
tests were re-written to take this into account.

Signed-off-by: André Martins <andre@cilium.io>
Signed-off-by: Joe Stringer <joe@cilium.io>
@joestringer joestringer force-pushed the pr/v1.7-backport-2020-04-01-1 branch from d00b4c1 to 6c5c3c8 Compare April 2, 2020 03:10
@joestringer
Copy link
Member Author

never-tell-me-the-odds

@borkmann
Copy link
Member

borkmann commented Apr 2, 2020

test-upstream-k8s

1 similar comment
@borkmann
Copy link
Member

borkmann commented Apr 2, 2020

test-upstream-k8s

Copy link
Member

@aanm aanm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for my commits

@pchaigno
Copy link
Member

pchaigno commented Apr 2, 2020

test-upstream-k8s

@borkmann borkmann merged commit 4fad11f into v1.7 Apr 2, 2020
@borkmann borkmann deleted the pr/v1.7-backport-2020-04-01-1 branch April 2, 2020 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/backports This PR provides functionality previously merged into master.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants