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

Manual cherrypick of part of #44053 to release-1.6 #44246

Merged
merged 1 commit into from Apr 10, 2017

Conversation

thockin
Copy link
Member

@thockin thockin commented Apr 8, 2017

This is a manual application of git commit 7664b97 to release-1.6 branch, because the context leading up to that commit was a lot of churn not necessary for the surgical fix. We have at least one user report of hitting this.

Fix for kube-proxy healthcheck handling an update that simultaneously removes one port and adds another.

@ethernetdan are you patch czar for 1.6 ?

This is a manual application of git commit 7664b97 to
release-1.6 branch, because the context leading up to that commit was a
lot of churn not necessary for the surgical fix.

7664b97:

Add tests for kube-proxy healthcheck, fix bug

Adding test cases for HC updates found a bug with an update that
simultaneously removes one port and adds another.  Map iteration is
randomized, so sometimes no HC would be created.
@thockin thockin added this to the v1.6 milestone Apr 8, 2017
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 8, 2017
@k8s-github-robot k8s-github-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Apr 8, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@thockin
Copy link
Member Author

thockin commented Apr 8, 2017

@MrHohn @freehan there is significantly different context for 1.5 - do either of you have time to help me backport this? Or should we not try? Feedback welcome..

@MrHohn
Copy link
Member

MrHohn commented Apr 9, 2017

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 9, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: MrHohn, thockin

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@MrHohn
Copy link
Member

MrHohn commented Apr 9, 2017

there is significantly different context for 1.5 - do either of you have time to help me backport this? Or should we not try?

Let me give it a try.

@MrHohn
Copy link
Member

MrHohn commented Apr 10, 2017

Took a look at the codes, it seems a bit risky to cherrypick the whole commit (7664b97) into 1.5, given recent overhauls on kube-proxy. Specifically, for backporting the new added healthCheck update tests, we have at least these dependencies:

  • Refactor OnEndpointsUpdate for testing (9507af3)
  • Add tests for updateEndpoints (6069d49)
  • Make healthcheck an interface (cddda17)

However, if we only cherrypick the proxier.go part (which basically just changes map[proxy.ServicePortName]bool to map[types.NamespacedName][]*endpointsInfo{}), it seems simple enough and sufficient for the bug fix.

What do you think? @thockin @freehan

@thockin
Copy link
Member Author

thockin commented Apr 10, 2017 via email

@enisoc enisoc added cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. and removed do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. labels Apr 10, 2017
@enisoc
Copy link
Member

enisoc commented Apr 10, 2017

@thockin I tried to reword the release note in terms of what a user might observe. Please edit it if I've mangled the meaning.

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 65b18e1 into kubernetes:release-1.6 Apr 10, 2017
@k8s-cherrypick-bot
Copy link

Commit found in the "release-1.6" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked.

@MrHohn
Copy link
Member

MrHohn commented Apr 11, 2017

Quick update, just reproduced the same issue on with latest 1.6 codes:

  • Create a LoadBalancer Service with OnlyLocal annotation on it (and the backends):
apiVersion: v1
kind: Service
metadata:
  name: my-nginx
  labels:
    run: my-nginx
  annotations:
    service.beta.kubernetes.io/external-traffic: OnlyLocal
spec:
  selector:
    run: my-nginx
  ports:
  - name: "port1"
    port: 80
    protocol: TCP
  type: LoadBalancer
  • Rename the port name from "port1" to "port2"
  • kube-proxy stops servicing health check for this service on nodes.

Dug a bit into it, found the bug is triggered by OnServiceUpdate, but this cherrypick only fixes OnEndpointUpdate :(

@thockin
Copy link
Member Author

thockin commented Apr 11, 2017

We may want to roll this back, depending on what the real fix to the fix is. This alone is not detrimental, but it seems it is incomplete.

@cblecker
Copy link
Member

@MrHohn @thockin Do we need an additional PR to fix OnServiceUpdate on the 1.6 branch too?

@thockin
Copy link
Member Author

thockin commented Apr 17, 2017

#44315 covered it.

k8s-github-robot pushed a commit that referenced this pull request Apr 18, 2017
Automatic merge from submit-queue

Manual cherry pick of part of #44053 to release-1.5

This cherry pick has the same purpose as #44246 and #44315.

The first commit is a manual application of git commit 7664b97 to
release-1.5 branch. The unit test part is dropped as it has too
many dependencies that shouldn't be cherry picked.

The second commit is a surgical fix that does not exist on 1.6+, as
we overhauled healthcheck package completely. It fixes the health
check deletion logic in OnServiceUpdate for the same bug.

@thockin @freehan 

**Release note**:

```release-note
Fix for kube-proxy healthcheck handling an update that simultaneously removes one port and adds another.
```
mintzhao pushed a commit to mintzhao/kubernetes that referenced this pull request Jun 1, 2017
Automatic merge from submit-queue

Manual cherrypick of part of kubernetes#44053 to release-1.6

This is a manual application of git commit 7664b97 to release-1.6 branch, because the context leading up to that commit was a lot of churn not necessary for the surgical fix.  We have at least one user report of hitting this.

```release-note
Fix for kube-proxy healthcheck handling an update that simultaneously removes one port and adds another.
```

@ethernetdan are you patch czar for 1.6 ?
@thockin thockin deleted the release-1.6 branch August 14, 2019 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants