Skip to content

v1.7 backports 2020-07-22#12622

Merged
christarazi merged 10 commits intov1.7from
pr/v1.7-backport-2020-07-22
Jul 23, 2020
Merged

v1.7 backports 2020-07-22#12622
christarazi merged 10 commits intov1.7from
pr/v1.7-backport-2020-07-22

Conversation

@jrfastab
Copy link
Copy Markdown
Contributor

@jrfastab jrfastab commented Jul 22, 2020

Backport notes:
#12440 -- ./pkg/apis/cilium.io/v2/client/register.go is here ./pkg/apis/cilium.io/v2/register.go otherwise applied cleanly
#12517 -- concepts/scalability/index.rst does not exist so I put the identity-relevant-labels.rst in the getting started index
#12605 -- added 12605 to get going in the pipeline, it applied cleanly.

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

$ for pr in 12440 12517 12605; do contrib/backporting/set-labels.py $pr done 1.7; done

lbernail and others added 3 commits July 22, 2020 14:59
[ upstream commit 678e7f0 ]

Fixes: f0049da ("pkg/k8s: fix all structural issues with CNP validation")

Signed-off-by: Laurent Bernaille <laurent.bernaille@datadoghq.com>
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
[ upstream commit 0945666 ]

Fixes: #11540
Signed-off-by: Sean Winn <sean@isovalent.com>
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
[ upstream commit a5fe80e ]

backport note: concepts/scalability/index.rst does not exist in 1.7
               so I left identity-relevant-labels in gettingstarted
               index.

Signed-off-by: Sean Winn <sean@isovalent.com>
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
@jrfastab jrfastab requested a review from a team as a code owner July 22, 2020 22:16
@maintainer-s-little-helper maintainer-s-little-helper Bot added backport/1.7 kind/backports This PR provides functionality previously merged into master. labels Jul 22, 2020
@jrfastab
Copy link
Copy Markdown
Contributor Author

test-backport-1.7

@christarazi christarazi requested a review from seanmwinn July 22, 2020 22:31
@christarazi
Copy link
Copy Markdown
Member

@seanmwinn Since your PR #12517 has been marked for 1.6 and 1.7 backport, please review the doc change, as the doc structure has changed since 1.6/1.7.

@pchaigno
Copy link
Copy Markdown
Member

Labels for the two PRs had not been updated. I just updated them.

@jrfastab
Copy link
Copy Markdown
Contributor Author

test-backport-1.7

tgraf added 7 commits July 23, 2020 12:06
[ upstream commit f6a751f ]

Same as ba9031b ("etcd: Ensure that session renewal controller exit") but
for the lock session.

Signed-off-by: Thomas Graf <thomas@cilium.io>
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
[ upstream commit 794c34b ]

Commit 19ad311 incorrectly changed the return value to nil instead of
returning an error.

Fixes: 19ad311 ("kvstore: Fix Watch() to return when client is closed or context is cancelled")
Signed-off-by: Thomas Graf <thomas@cilium.io>
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
[ upstream commit bf8e432 ]

The firstSession channel has been used to allow blocking until the initial
session has been established. However, because callers have not been handling
errors, it was not possible to close the channel if the etcd client was shut
down before the session was ever established and thus the channel was leaked.

This was even more problematic for etcd operations performed without a context
with a timeout as most operations currently block on firstSession or context.

Consolidate the errChan and firstSession as they effectively served the same
purpose. The only slight change is that the firstSession channel is closed
*after* the etcd version has been verified which is the right behavior anyway.

Having the error condition returned via the firstSession channel allows to
return it to owning controllers as well when renewing sessions for better
visibility.

Signed-off-by: Thomas Graf <thomas@cilium.io>
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
[ upstream commit e959c9f ]

Signed-off-by: Thomas Graf <thomas@cilium.io>
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
[ upstream commit 589bdf3 ]

Signed-off-by: Thomas Graf <thomas@cilium.io>
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
[ upstream commit 02a1810 ]

Signed-off-by: Thomas Graf <thomas@cilium.io>
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
[ upstream commit 0262854 ]

The context passed into NewSession() was supposed to enforce a timeout on the
NewSession() operation which is triggering a Grant() and KeepAlive()
instruction. However, the context passed into NewSession() will also be
associated with the resulting lease. As per etcd documentation, this will
result in:

> If the context is canceled before Close() completes, the session's lease will
> be abandoned and left to expire instead of being revoked.

Because of this, any session renewal triggering a new session would create a
session that is immediately closed again due to the context passed into
NewSession being cancelled when the controller run ends successfully. This
resulted in any renewed session to have an effective lifetime of 10
milliseconds before requiring renewal again.

Fixes: #12619
Fixes: 8524fca ("kvstore: Add session renew backoff")

Signed-off-by: Thomas Graf <thomas@cilium.io>
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
@jrfastab
Copy link
Copy Markdown
Contributor Author

test-backport-1.7

@christarazi christarazi self-assigned this Jul 23, 2020
@christarazi christarazi merged commit 350c881 into v1.7 Jul 23, 2020
@christarazi christarazi deleted the pr/v1.7-backport-2020-07-22 branch July 23, 2020 22:39
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.

7 participants