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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix handling of service comments in iptables #81563

Closed
wants to merge 3 commits into from

Conversation

odinuge
Copy link
Member

@odinuge odinuge commented Aug 18, 2019

What type of PR is this?
/kind bug

What this PR does / why we need it:
Stumbled upon this when debugging some network issues with debian buster (ref. #71305, hopefully we can get that sorted out soon).

This will make "appendServiceCommentLocked" do what it looks like it
does. The current implementation is just plain dead code, as the
append func does not edit in place.

As discussed in the original PR, we could create a new flag to allow the
user to enable the comments when needed. This will increase the size of
the iptables rules, but not the way they work.

Original PR:
#65755

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:
Guess we can rewrite the func to something like this, if that is preferable:

func (proxier *Proxier) serviceCommentLocked(svcName string) []string {
  if proxier.endpointChainsNumber > endpointChainsNumberThreshold {
    return []string{}
  }
  return []string{"-m", "comment", "--comment", svcName}
}

Do we need a release note for this? 馃

Does this PR introduce a user-facing change?:

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Aug 18, 2019
@k8s-ci-robot k8s-ci-robot added sig/network Categorizes an issue or PR as relevant to SIG Network. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Aug 18, 2019
@odinuge
Copy link
Member Author

odinuge commented Aug 18, 2019

/cc thockin
/cc wojtek-t

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 16, 2019
@danwinship
Copy link
Contributor

/assign @thockin

Copy link
Member

@thockin thockin left a comment

Choose a reason for hiding this comment

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

Thanks!

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Dec 16, 2019
@odinuge
Copy link
Member Author

odinuge commented Dec 18, 2019

/retest

This will make "appendServiceCommentLocked" do what it looks like it
does. The current implementation is just plain dead code, as the
append func does not edit in place.

As discussed in the original PR, we could create a new flag to allow the
user to enable the comments when needed. This will increase the size of
the iptables rules, but not the way they work.

Original PR:
kubernetes#65755
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 18, 2019
@odinuge
Copy link
Member Author

odinuge commented Dec 18, 2019

/retest

@odinuge
Copy link
Member Author

odinuge commented Dec 20, 2019

/test pull-kubernetes-e2e-gce

@odinuge
Copy link
Member Author

odinuge commented Dec 20, 2019

Had to update some tests that was created after this PR. Should be good to go again now. @thockin

@aojea
Copy link
Member

aojea commented Dec 21, 2019

I think that the commits should we squashed so the new functionality and the tests merge together in one commit

Copy link
Member

@thockin thockin left a comment

Choose a reason for hiding this comment

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

Thanks!

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 23, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@thockin thockin added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 23, 2019
@thockin
Copy link
Member

thockin commented Dec 23, 2019

#81886 includes this and is already squashed and approved (and doesn't rename the service port, which I just noticed)

@thockin thockin closed this Dec 30, 2019
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/network Categorizes an issue or PR as relevant to SIG Network. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants