Skip to content

Conversation

kkourt
Copy link
Contributor

@kkourt kkourt commented Sep 16, 2020

v1.8 backports 2020-09-16

There were some conflicts, so please have a look. Notes below.

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

$ for pr in 13120 12694 13135 13153 13095 13159 13150 13049; do contrib/backporting/set-labels.py $pr done 1.8; done

chowmean and others added 4 commits September 16, 2020 08:55
[ upstream commit b10fd49 ]

Signed-off-by: Gaurav Yadav <gaurav.dev.iiitm@gmail.com>
Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
[ upstream commit 4c68f8a ]

Signed-off-by: Gaurav Yadav <gaurav.dev.iiitm@gmail.com>
Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
[ upstream commit 3d6cf1b ]

Signed-off-by: Gaurav Yadav <gaurav.dev.iiitm@gmail.com>
Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
[ upstream commit d7433cf ]

In endpoint-routes mode, we encode the source identity in the ctx->mark
when locally routing the packet to the destination device for ingress
policy assessment. Previously we only encoded the local cluster
identity in the mark, thereby omitting the original cluster portion of
the identity.

Found by code inspection.

Fixes: 654303a ("bpf: Skip ingress policy at egress of source if egress prog is in use")
Signed-off-by: Joe Stringer <joe@cilium.io>
Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
@kkourt kkourt added kind/backports This PR provides functionality previously merged into master. backport/1.8 labels Sep 16, 2020
@kkourt kkourt requested a review from a team as a code owner September 16, 2020 09:13
@kkourt
Copy link
Contributor Author

kkourt commented Sep 16, 2020

test-backport-1.8

Copy link
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.

👍 for my PR and #13150.

Copy link
Member

@tklauser tklauser left a comment

Choose a reason for hiding this comment

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

#13153 -- Report correct target system architecture in Cilium version (@tklauser)

conflict on original commit d570daa resolved by omitting change in daemon/cmd/daemon_main.go since the corresponding line does not exist

I think this comment should instead belong to

#13141 -- operator: fix invocation with --help option (@tklauser)

instead? Regarding commit d570daa: it looks like this didn't apply because #12675 wasn't backported. I've now marked it as needs-backport/1.8 and maybe you could pick it up for this backport PR before the PR above, so the conflict would go away?

@kkourt
Copy link
Contributor Author

kkourt commented Sep 16, 2020

#13153 -- Report correct target system architecture in Cilium version (@tklauser)
conflict on original commit d570daa resolved by omitting change in daemon/cmd/daemon_main.go since the corresponding line does not exist

I think this comment should instead belong to

#13141 -- operator: fix invocation with --help option (@tklauser)

Indeed, apologies.

instead? Regarding commit d570daa: it looks like this didn't apply because #12675 wasn't backported. I've now marked it as needs-backport/1.8 and maybe you could pick it up for this backport PR before the PR above, so the conflict would go away?

How about, I remove #13141 from this PR so that we can pick it up on the next backport round together with #12675? This solution seems simpler to me... I can do another backport round tomorrow.

@ghost
Copy link

ghost commented Sep 16, 2020

@kkourt Is there time left to get #13175 in ?

@kkourt
Copy link
Contributor Author

kkourt commented Sep 16, 2020

@kkourt Is there time left to get #13175 in ?

#13175 does not seem to have been merged on master yet, so I'm afraid it cannot be backported. Once it is merged on master it can be picked up by a backport.

@tklauser
Copy link
Member

instead? Regarding commit d570daa: it looks like this didn't apply because #12675 wasn't backported. I've now marked it as needs-backport/1.8 and maybe you could pick it up for this backport PR before the PR above, so the conflict would go away?

How about, I remove #13141 from this PR so that we can pick it up on the next backport round together with #12675? This solution seems simpler to me... I can do another backport round tomorrow.

Indeed, that sounds like the simpler solution. Let's drop #13141 from this PR.

Copy link
Member

@sayboras sayboras left a comment

Choose a reason for hiding this comment

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

Looks good for my change

@kkourt kkourt force-pushed the pr/v1.8-backport-2020-09-16 branch from 6abcd8d to 5dddefc Compare September 16, 2020 11:52
@kkourt
Copy link
Contributor Author

kkourt commented Sep 16, 2020

As per discussion above, I dropped #13141 (and updated its labels) so that it can be picked up together with #12675.

@tklauser since #13141 is labeled for backport on v1.7, should we mark #12675 also as needs-backport/1.7?

@tklauser
Copy link
Member

As per discussion above, I dropped #13141 (and updated its labels) so that it can be picked up together with #12675.

Thanks!

@tklauser since #13141 is labeled for backport on v1.7, should we mark #12675 also as needs-backport/1.7?

Good point, marked it as needs-backport/1.7.

aanm and others added 5 commits September 16, 2020 16:14
[ upstream commit d1c6a75 ]

The code for handling CNP status updates from other nodes via the
kvstore was previously not covered by the same option that enables this
functionality in the cilium-agent daemon. As such, this could cause the
logic to run, including goroutines for each CNP, in scenarios where this
logic is not in use.

Improve memory usage by disabling this functionality when it is disabled.

Co-authored-by: Joe Stringer <joe@cilium.io>
Signed-off-by: Joe Stringer <joe@cilium.io>
Signed-off-by: André Martins <andre@cilium.io>
Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
[ upstream commit 8efceda ]

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
[ upstream commit 3fb4d15 ]

When cross-building Cilium, like we do for the ARM64 image,
version.Version reports the GOOS/GOARCH of the build system (i.e.
linux/amd64) because it is set to the value of `go version` as run on
the build system.

Instead, report the Go version properties of the proper target system by
using the corresponding information from Go's runtime package. Mimic the
`go version` format to keep Cilium's version format backwards-compatible.

Fixes #13122

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
[ upstream commit ed00ac6 ]

Signed-off-by: Gaurav Yadav <gaurav.dev.iiitm@gmail.com>
Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
[ upstream commit bb9411b ]

From minikube 1.12.1+, cilium quick install can be enabled by passing flag
--network-cni=cilium

Signed-off-by: Tam Mach <sayboras@yahoo.com>
Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
brb and others added 5 commits September 16, 2020 16:14
[ upstream commit f191f9e ]

Remove ipmasq, source range check and session affinity related maps if
corresponding features are not enabled.

Signed-off-by: Martynas Pumputis <m@lambda.lt>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
[ upstream commit dc6a065 ]

If kube-proxy is in use (no BPF-based masquerading), packets from pods may
be SNATed. The response packet will therefore have a host IP as the
destination IP. For example, if a pod connects to 1.1.1.1:

  # Pod sends a SYN.
  from-lxc: 10.8.0.1 -> 1.1.1.1
  # Src IP gets masqueraded to 192.168.33.11. We skip the host firewall
  # because the packet mark tells us this is not coming from hostns.
  to-netdev: 192.168.33.11 -> 1.1.1.1
  ...
  # SYN+ACK is sent to 192.168.33.11. This IP belongs to the host
  # endpoints, so we incorrectly enforce host policy on this packet.
  from-netdev: 1.1.1.1 -> 192.168.33.11

To avoid enforcing host policies for response packets to pods, we need to
create a CT entry for the forward, SNATed packet from the pod. Response
packets will thus match this CT entry and bypass host policies.

I tested this change by deploying the connectivity checks in the dev. VM
with kube-proxy and the lock-down-dev-vms.yaml host policy. A subsequent
commit also updates the CIDR+toPorts host policy test to run it when
kube-proxy is used. Finally, the pull request has label ci/host-firewall
to run all e2e CI tests on Jenkins with the host firewall enabled by
default.

Fixes: 88bf291 ("bpf: Enforce host policies for IPv4")
Signed-off-by: Paul Chaignon <paul@cilium.io>
Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
[ upstream commit 5b581f6 ]

Previous commit fixed the host firewall to work with kube-proxy. Thus,
we can now run the CIDR+toPorts test for the host firewall when
kube-proxy is enabled.

Signed-off-by: Paul Chaignon <paul@cilium.io>
Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
[ upstream commit 3135759 ]

This includes allowing some services that were not present on the
release-channel=rapid GKE clusters.

Signed-off-by: Paul Chaignon <paul@cilium.io>
Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
[ upstream commit 4028da9 ]

Signed-off-by: Paul Chaignon <paul@cilium.io>
Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
@kkourt kkourt force-pushed the pr/v1.8-backport-2020-09-16 branch from 5dddefc to 793615f Compare September 16, 2020 14:16
@kkourt
Copy link
Contributor Author

kkourt commented Sep 16, 2020

test-backport-1.8

@kkourt
Copy link
Contributor Author

kkourt commented Sep 16, 2020

test-upstream-k8s

@joestringer joestringer merged commit 803d991 into v1.8 Sep 16, 2020
@joestringer joestringer deleted the pr/v1.8-backport-2020-09-16 branch September 16, 2020 23:22
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.

8 participants