Skip to content

v1.7 backports 2020-10-15#13595

Merged
aanm merged 4 commits intov1.7from
pr/v1.7-backport-2020-10-15
Oct 20, 2020
Merged

v1.7 backports 2020-10-15#13595
aanm merged 4 commits intov1.7from
pr/v1.7-backport-2020-10-15

Conversation

@christarazi
Copy link
Copy Markdown
Member

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

$ for pr in 13532 13576 13514; do contrib/backporting/set-labels.py $pr done 1.7; done

[ upstream commit 1afb536 ]

Avoid having to leave around stale XDP programs when the config
changes. Therefore do the same as we do in tc which is to clean
up prior state.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Chris Tarazi <chris@isovalent.com>
@christarazi christarazi requested a review from a team as a code owner October 16, 2020 06:55
@christarazi christarazi added backport/1.7 kind/backports This PR provides functionality previously merged into master. labels Oct 16, 2020
@maintainer-s-little-helper maintainer-s-little-helper Bot added backport/1.7 kind/backports This PR provides functionality previously merged into master. labels Oct 16, 2020
@christarazi
Copy link
Copy Markdown
Member Author

test-backport-1.7

@tklauser
Copy link
Copy Markdown
Member

Looks like bindata needs to be updated for bpf/:

[2020-10-16T07:30:14.342Z]     k8s1-1.17:   CHECK contrib/scripts/bindata.sh
[2020-10-16T07:30:14.342Z]     k8s1-1.17: ../contrib/scripts/bindata.sh 7908e40e990be4a6a2b99755863abd58630958ac
[2020-10-16T07:30:14.342Z]     k8s1-1.17: �[91msha1sum: WARNING: 1 computed checksum did NOT match
[2020-10-16T07:30:14.342Z]     k8s1-1.17: �[0mbindata.go: FAILED
[2020-10-16T07:30:14.342Z]     k8s1-1.17: ########################################################################
[2020-10-16T07:30:14.342Z]     k8s1-1.17: 
[2020-10-16T07:30:14.342Z]     k8s1-1.17:                   ERROR: bindata.go is out of date.
[2020-10-16T07:30:14.342Z]     k8s1-1.17: 
[2020-10-16T07:30:14.342Z]     k8s1-1.17:  This can happen for two reasons:
[2020-10-16T07:30:14.342Z]     k8s1-1.17:  1. You are using a go-bindata binary compiled with a different version
[2020-10-16T07:30:14.342Z]     k8s1-1.17:     of golang (not 1.13.15). If so, please up/downgrade.
[2020-10-16T07:30:14.342Z]     k8s1-1.17: 
[2020-10-16T07:30:14.342Z]     k8s1-1.17:  2. You have made changes to the bpf/ directory. Please run the
[2020-10-16T07:30:14.342Z]     k8s1-1.17:     following command to update the SHA in daemon/bpf.sha:
[2020-10-16T07:30:14.342Z]     k8s1-1.17: 
[2020-10-16T07:30:14.342Z]     k8s1-1.17:     $ make -C daemon apply-bindata
[2020-10-16T07:30:14.342Z]     k8s1-1.17: 
[2020-10-16T07:30:14.342Z]     k8s1-1.17: ########################################################################
[2020-10-16T07:30:14.342Z]     k8s1-1.17: Makefile:53: recipe for target 'check-bindata' failed

jaffcheng and others added 3 commits October 16, 2020 09:30
[ upstream commit 8f0e7fa ]

[ Backporter's notes: Includes update to bpf.sha. ]

Currently, during agent startup, cilium removes XDP from all
interfaces except for `cilium_host`, `cilium_net` and `$XDP_DEV`
regardless of whether there is an XDP program attached to it.

For some drivers, e.g. Mellanox mlx5, the following command will
cause device reset regardless of whether there is an XDP program
attached to it, which introduces node and pod network interruption:
`ip link set dev $DEV xdpdrv off`.

This patch adds a check of XDP program existence to avoid such
network interruption.

Fixes: #13526
Reported-by: ArthurChiao <arthurchiao@hotmail.com>
Signed-off-by: Jaff Cheng <jaff.cheng.sh@gmail.com>
Signed-off-by: Chris Tarazi <chris@isovalent.com>
[ upstream commit b34e5d8 ]

When rolling over, it should use initNextID instead of FirstFreeServiceID,
which doesn't belong to the IDAllocator. This would create problems if
FirstFreeServiceID and FirstFreeBackendID have different values although now
they happen to be the same.

Fixes: ab9cf4b ("service: Make local ID allocator more service agnostic")
Signed-off-by: Han Zhou <hzhou8@ebay.com>
Signed-off-by: Chris Tarazi <chris@isovalent.com>
[ upstream commit 005291c ]

Because the identity allocator is initialized asychronously via
`InitIdentityAllocator`, the local identitiy allocator might not have
been initialized yet when the lookup functions are called. This can
cause nil pointer panics, as observed in #13479.

Before b194612, this nil pointer panic
could not occur in `LookupIdentityByID` as the function checked for
`m.IdentityAllocator != nil` which also implies `m.localIdentities != nil`.

This commit adds an explict check for `m.localIdentities` and fixes a
potential data race by checking the initialization channels before
accessing `m.localIdentities` or `m.IdentityAllocator`.

Fixes: #13479
Fixes: b194612 ("identity: Avoid kvstore lookup for local identities")

Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
Signed-off-by: Chris Tarazi <chris@isovalent.com>
@christarazi christarazi force-pushed the pr/v1.7-backport-2020-10-15 branch from 09868df to f7a826b Compare October 16, 2020 16:31
@christarazi
Copy link
Copy Markdown
Member Author

christarazi commented Oct 16, 2020

test-backport-1.7

Edit: failures hit known flakes #13282 and #8775

Copy link
Copy Markdown
Member

@gandro gandro 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 commit!

@christarazi
Copy link
Copy Markdown
Member Author

test-backport-1.7

Copy link
Copy Markdown
Member

@pchaigno pchaigno left a comment

Choose a reason for hiding this comment

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

I reviewed the first two commits (concerning the datapath) and they look good to me!

@maintainer-s-little-helper maintainer-s-little-helper Bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Oct 20, 2020
@aanm aanm merged commit e1c9152 into v1.7 Oct 20, 2020
@aanm aanm deleted the pr/v1.7-backport-2020-10-15 branch October 20, 2020 08:33
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. ready-to-merge This PR has passed all tests and received consensus from code owners to merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants