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

Use /proc/net/nf_conntrack. #57896

Merged
merged 1 commit into from Jan 22, 2018

Conversation

chrisglass
Copy link

/proc/net/ip_conntrack was finally removed from linux 4.9 onwards,
instead we should use /proc/net/nf_conntrack (see commit message at
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=adf0516845bcd0e626323c858ece28ee58c74455)

Signed-off-by: Chris Glass chris.glass@canonical.com

What this PR does / why we need it:

This PR fixes a test failure from linux kernels 4.9 onwards. The alternative interface used in this PR has been available for 10 years, so it is unlikely not to be available.

Special notes for your reviewer:

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 5, 2018
@chrisglass
Copy link
Author

/cc @yguo0905

@zouyee
Copy link
Member

zouyee commented Jan 5, 2018

duplicate #56765

@@ -171,16 +171,16 @@ var _ = SIGDescribe("Network", func() {
// If test flakes occur here, then this check should be performed
// in a loop as there may be a race with the client connecting.
framework.IssueSSHCommandWithResult(
fmt.Sprintf("sudo cat /proc/net/ip_conntrack | grep 'dport=%v'",
fmt.Sprintf("sudo cat /proc/net/nf_conntrack | grep 'dport=%v'",
testDaemonTcpPort),
framework.TestContext.Provider,
clientNodeInfo.node)

// Timeout in seconds is available as the third column from
Copy link
Contributor

Choose a reason for hiding this comment

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

The columns have changed in nf_conntrack. It should be the 5th one.

Copy link
Author

Choose a reason for hiding this comment

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

Ah, it would be the third field for the "conntrack" untility's output.

Perhaps that is an argument towards using it to abstract eventual kernel changes?

Let me know what you think is appropriate here.

Copy link
Contributor

Choose a reason for hiding this comment

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

conntrack is not installed on everywhere - cos-63 does not have it. Looks like checking nf_conntrack is safer.

Copy link
Author

Choose a reason for hiding this comment

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

Ack. I'll update the PR in that sense.

@yguo0905
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 17, 2018
@yguo0905
Copy link
Contributor

@bowei, please take a look. Thanks.

@justinsb
Copy link
Member

I think the issue fixed by this PR is now breaking the kops e2e tests, likely causing problems for merges. cc @bowei @caseydavenport @kubernetes/sig-network-bugs

@dims
Copy link
Member

dims commented Jan 20, 2018

@kubernetes/sig-network-bugs Can you PTAL?

@mikedanese
Copy link
Member

/approve no-issue

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chrisglass, mikedanese, yguo0905

Associated issue requirement bypassed by: mikedanese

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

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 21, 2018
@justinsb
Copy link
Member

/retest

nfs issues: #58578

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to @fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

1 similar comment
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to @fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 21, 2018
@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 21, 2018
@mikedanese
Copy link
Member

please squash fixup commits

/proc/net/ip_conntrack was finally removed from linux 4.9 onwards,
instead we should use /proc/net/nf_conntrack (see commit message at
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=adf0516845bcd0e626323c858ece28ee58c74455)

Signed-off-by: Chris Glass <chris.glass@canonical.com>
@chrisglass
Copy link
Author

Squashed.

@mikedanese mikedanese added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 21, 2018
@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to @fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to @fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel comment for consistent failures.

@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 57896, 58070). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 05529df into kubernetes:master Jan 22, 2018
k8s-github-robot pushed a commit that referenced this pull request Jan 24, 2018
…96-upstream-release-1.7

Automatic merge from submit-queue.

Automated cherry pick of #57896: Use /proc/net/nf_conntrack.

Cherry pick of #57896 on release-1.7.

#57896: Use /proc/net/nf_conntrack.
k8s-github-robot pushed a commit that referenced this pull request Jan 25, 2018
…96-upstream-release-1.9

Automatic merge from submit-queue.

Automated cherry pick of #57896: Use /proc/net/nf_conntrack.

Cherry pick of #57896 on release-1.9.

#57896: Use /proc/net/nf_conntrack.
k8s-github-robot pushed a commit that referenced this pull request Jan 25, 2018
…96-upstream-release-1.8

Automatic merge from submit-queue.

Automated cherry pick of #57896: Use /proc/net/nf_conntrack.

Cherry pick of #57896 on release-1.8.

#57896: Use /proc/net/nf_conntrack.
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. 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. 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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet